traverse audiostreams in reverse: Fixes #1180

This commit is contained in:
clinton-hall 2017-02-01 09:48:50 +10:30
commit 9ec9b13028

View file

@ -256,10 +256,10 @@ def buildCommands(file, newDir, movieName, bitbucket):
a_mapped = [] a_mapped = []
commentary = [] commentary = []
if audioStreams: if audioStreams:
for i, val in enumerate(audioStreams): for i, val in reversed(list(enumerate(audioStreams))):
try: try:
if "Commentary" in val.get("tags").get("title"): # Split out commentry tracks. if "Commentary" in val.get("tags").get("title"): # Split out commentry tracks.
commentary.append(audioStreams[i]) commentary.append(val)
del audioStreams[i] del audioStreams[i]
except: except:
continue continue