add header to generated m3u files

This commit is contained in:
Daniel Løvbrøtte Olsen 2018-10-21 10:56:31 +00:00
parent 68f53e4f7e
commit b393a47268
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,8 @@
set -euo pipefail set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
echo "#EXT3MU
function get_duration { function get_duration {
preconvert=$(youtube-dl --get-duration -- "$1" | perl -p -i -e 's/(\d\d?):(\d\d)/$1 minutes+$2 seconds/' 2> /dev/null) preconvert=$(youtube-dl --get-duration -- "$1" | perl -p -i -e 's/(\d\d?):(\d\d)/$1 minutes+$2 seconds/' 2> /dev/null)
convert=$(units "$preconvert") convert=$(units "$preconvert")