summaryrefslogtreecommitdiffstats
path: root/skripti/earhorn_m3u.sh
diff options
context:
space:
mode:
Diffstat (limited to 'skripti/earhorn_m3u.sh')
-rwxr-xr-xskripti/earhorn_m3u.sh17
1 files changed, 13 insertions, 4 deletions
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