From b815858d23f9710557f497a430cfd0cadb1ac82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sat, 8 Jun 2024 14:53:59 +0200 Subject: skripti --- skripti/earhorn_m3u.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'skripti/earhorn_m3u.sh') diff --git a/skripti/earhorn_m3u.sh b/skripti/earhorn_m3u.sh index 4dae851..efffa1b 100755 --- a/skripti/earhorn_m3u.sh +++ b/skripti/earhorn_m3u.sh @@ -27,8 +27,17 @@ do then # tu smatram, da vsaka datoteka zavzema 3 vrstice head -n-3 $2 | grep -B2 ^$1$file$ && continue fi # prvič v head ko rečem -n-3 in drugič v grep, ko rečem -B2 - dol=`ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $file | cut -d. -f1` - echo "#EXTINF:$dol,Radijski arhiv" - echo "#EXT-X-PROGRAM-DATE-TIME:${date}T$h:$m:${s}Z" - echo $1$file + set +e + dol=`ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $file` + koda=$? + set -e + if [ $koda -eq 0 ] + then + echo "#EXTINF:$dol,Radijski arhiv" + echo "#EXT-X-PROGRAM-DATE-TIME:${date}T$h:$m:${s}Z" + echo $1$file + else + echo "# NAPAKA $file ffprobe vrnil $koda" + echo "NAPAKA $file ffprobe vrnil $koda" >&2 + fi done -- cgit v1.2.3