mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-06 05:01:10 -07:00
Check for existence of codec_type key when counting streams
This commit is contained in:
parent
26957918e5
commit
57f6907922
1 changed files with 2 additions and 2 deletions
|
@ -26,8 +26,8 @@ def isVideoGood(videofile, status):
|
|||
disable = True
|
||||
logger.info("DISABLED: ffprobe failed to analyse test file. Stopping corruption check.", 'TRANSCODER')
|
||||
if test_details.get("streams"):
|
||||
vidStreams = [item for item in test_details["streams"] if item["codec_type"] == "video"]
|
||||
audStreams = [item for item in test_details["streams"] if item["codec_type"] == "audio"]
|
||||
vidStreams = [item for item in test_details["streams"] if "codec_type" in item and item["codec_type"] == "video"]
|
||||
audStreams = [item for item in test_details["streams"] if "codec_type" in item and item["codec_type"] == "audio"]
|
||||
if not (len(vidStreams) > 0 and len(audStreams) > 0):
|
||||
disable = True
|
||||
logger.info("DISABLED: ffprobe failed to analyse streams from test file. Stopping corruption check.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue