Playlist script

Créer facilement une playlist par dossier de musique.

 

#!/bin/bash
#
# bash script to create playlist files in music subdirectories
# This one will aggregate every sonds inside only one same playlist
# Steve Carlson ([email protected])
rm -f all.m3u
find . -type d |
while read subdir
do
# rm -f "$subdir"/*.m3u
for filename in "$subdir"/*
do
if [[ ${filename##*.} =~ m4a|mp3|ogg|aac|wav|wma ]]
then
#echo "${filename##*/}" >> ./"$subdir"/"${subdir##*/}.m3u"
echo "${subdir##*/}/${filename##*/}" >> ./all.m3u
fi
done
done
view raw playlist-all.sh hosted with ❤ by GitHub
#!/bin/bash
#
# bash script to create playlist files in music subdirectories
#
# Steve Carlson ([email protected])
rm -f *.m3u
find . -type d |
while read subdir
do
rm -f "$subdir"/*.m3u
for filename in "$subdir"/*
do
if [[ ${filename##*.} =~ m4a|mp3|ogg|aac|wav|wma ]]
then
echo "${filename##*/}" >> ./"$subdir"/"${subdir##*/}.m3u"
echo "${subdir##*/}/${filename##*/}" >> ./"${subdir##*/}.m3u"
fi
done
done
view raw playlist.sh hosted with ❤ by GitHub

Laissez un commentaire

Votre adresse de messagerie ne sera pas publiée.

Search
Generic filters
Exact matches only
Filter by Custom Post Type