From 66bdfa4b3b69a74bf6ca28b5a2cbd11149185880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sat, 1 Jun 2024 16:35:11 +0200 Subject: earhorn_m3u --- skripti/earhorn_m3u.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 skripti/earhorn_m3u.sh 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 -- cgit v1.2.3