diff options
Diffstat (limited to '')
-rwxr-xr-x | skripti/earhorn_m3u.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/skripti/earhorn_m3u.sh b/skripti/earhorn_m3u.sh new file mode 100755 index 0000000..51f33c7 --- /dev/null +++ b/skripti/earhorn_m3u.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -xeo pipefail +echo "#EXTM3U" +find 2* -type f | while read file +do + date=`cut -d/ -f1,2,3 <<<$file | sed s,/,-,g` + time=`cut -d/ -f4 <<<$file | cut -d. -f1` + h=${time:0:2} + m=${time:2:2} + s=${time:4:2} + echo "#EXTINF:`ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $file | cut -d. -f1`,Radijski arhiv" + echo "#EXT-X-PROGRAM-DATE-TIME:${date}T$h:$m:${s}Z" + echo $1$file +done |