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 e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors