mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
catch errors if not audio codec name. Fixes #1109
This commit is contained in:
parent
14be873c7c
commit
07f419640c
1 changed files with 8 additions and 2 deletions
|
@ -259,7 +259,10 @@ def buildCommands(file, newDir, movieName, bitbucket):
|
||||||
audio1 = [item for item in audioStreams if item["tags"]["language"] == core.ALANGUAGE]
|
audio1 = [item for item in audioStreams if item["tags"]["language"] == core.ALANGUAGE]
|
||||||
except: # no language tags. Assume only 1 language.
|
except: # no language tags. Assume only 1 language.
|
||||||
audio1 = audioStreams
|
audio1 = audioStreams
|
||||||
audio2 = [item for item in audio1 if item["codec_name"] in core.ACODEC_ALLOW]
|
try:
|
||||||
|
audio2 = [item for item in audio1 if item["codec_name"] in core.ACODEC_ALLOW]
|
||||||
|
except:
|
||||||
|
audio2 = []
|
||||||
try:
|
try:
|
||||||
audio3 = [item for item in audioStreams if item["tags"]["language"] != core.ALANGUAGE]
|
audio3 = [item for item in audioStreams if item["tags"]["language"] != core.ALANGUAGE]
|
||||||
except:
|
except:
|
||||||
|
@ -301,7 +304,10 @@ def buildCommands(file, newDir, movieName, bitbucket):
|
||||||
|
|
||||||
if core.ACODEC2_ALLOW:
|
if core.ACODEC2_ALLOW:
|
||||||
used_audio += 1
|
used_audio += 1
|
||||||
audio4 = [item for item in audio1 if item["codec_name"] in core.ACODEC2_ALLOW]
|
try:
|
||||||
|
audio4 = [item for item in audio1 if item["codec_name"] in core.ACODEC2_ALLOW]
|
||||||
|
except:
|
||||||
|
audio4 = []
|
||||||
if audio4: # right language and codec.
|
if audio4: # right language and codec.
|
||||||
map_cmd.extend(['-map', '0:{index}'.format(index=audio4[0]["index"])])
|
map_cmd.extend(['-map', '0:{index}'.format(index=audio4[0]["index"])])
|
||||||
a_mapped.extend([audio4[0]["index"]])
|
a_mapped.extend([audio4[0]["index"]])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue