2020-04-13 12:08:02 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ $# = 0 ]
|
|
|
|
then
|
|
|
|
echo "Il manque en paramètres les fichiers audio à traiter"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
for file in $*
|
|
|
|
do
|
|
|
|
duree=`mediainfo $file | awk '/Duration/ {print $3*60+$5}' |head -1`
|
2020-04-29 15:28:52 +02:00
|
|
|
nom=`mediainfo $file | awk -F: '/Performer/ {print $2}' |sed '1,$s/ //'`
|
|
|
|
titre=`mediainfo $file | awk -F : '/Track name/ {print $2}' |sed '1,$s/ //'`
|
2020-04-13 12:08:02 +02:00
|
|
|
echo "#EXTINF:$duree,$nom - $titre"
|
|
|
|
echo "https://media.april.org/audio/radio-cause-commune/libre-a-vous/emissions/musiques/$file"
|
|
|
|
done
|
|
|
|
|