lav-outils/playlist/exportm3u.sh

18 lines
523 B
Bash
Executable File

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