Browse Source

fixed some messages and check for return code in check_audiostream for mpv

/\/\ \-/ ❭❬ 5 years ago
parent
commit
f997abb3e1
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      check.sh

+ 3
- 3
check.sh View File

@@ -321,7 +321,7 @@ check_audiostream() {
321 321
 
322 322
 		if [ "$bytes" -lt 1024 ]
323 323
 		then
324
-			fail "mplayer retrieved ${bytes}B of stream instead of expected $sz"
324
+			fail "mplayer retrieved ${bytes}B of stream $1 instead of expected $sz"
325 325
 			return
326 326
 		fi
327 327
 		if [ "$res" -eq 0 ]
@@ -334,10 +334,10 @@ check_audiostream() {
334 334
 	then
335 335
 		if [ "$verbose" -gt 1 ]
336 336
 		then
337
-			logdate INFO "$tc_name: Running mpv on '$1' for $sz" 3
337
+			logdate INFO "$tc_name: Running mpv on '$1'" 3
338 338
 		fi
339 339
 		tmpfile=$(mktemp -t check_audiostream.XXXXXXXXX)
340
-		$MPV --vo=null --ao=null --o=$tmpfile --of=wav --length 1 "$1" &> /dev/null
340
+		$MPV --vo=null --ao=null --o=$tmpfile --of=wav --length 2 "$1" &> /dev/null || fail "mpv could not stream $1" && return
341 341
 		bytes=$(du $tmpfile | cut -f1)
342 342
 		rm $tmpfile 2>/dev/null
343 343
 

Loading…
Cancel
Save