summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-06-01 16:35:11 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-06-01 16:35:11 +0200
commit66bdfa4b3b69a74bf6ca28b5a2cbd11149185880 (patch)
tree9cbe3b8a2d399d75aff90a35c33395cf1df7ff1f
parentvideonadzor.sh (diff)
downloadr-66bdfa4b3b69a74bf6ca28b5a2cbd11149185880.tar
r-66bdfa4b3b69a74bf6ca28b5a2cbd11149185880.tar.gz
r-66bdfa4b3b69a74bf6ca28b5a2cbd11149185880.tar.bz2
r-66bdfa4b3b69a74bf6ca28b5a2cbd11149185880.tar.lz
r-66bdfa4b3b69a74bf6ca28b5a2cbd11149185880.tar.xz
r-66bdfa4b3b69a74bf6ca28b5a2cbd11149185880.tar.zst
r-66bdfa4b3b69a74bf6ca28b5a2cbd11149185880.zip
-rwxr-xr-xskripti/earhorn_m3u.sh14
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