Frédéric Couchet 2020-04-13 12:08:02 +02:00 committed by Frédéric Couchet
parent 2a4c9258d3
commit b336341135

17
playlist/exportm3u.sh Executable file
View File

@ -0,0 +1,17 @@
#!/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`
nom=`mediainfo $file | awk -F: '/Performer/ {print $2}'`
titre=`mediainfo $file | awk -F : '/Track name/ {print $2}'`
echo "#EXTINF:$duree,$nom - $titre"
echo "https://media.april.org/audio/radio-cause-commune/libre-a-vous/emissions/musiques/$file"
done