traverse audiostreams in reverse: Fixes #1180

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

View file

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