From: Fraxinas Date: Fri, 8 Oct 2010 09:30:44 +0000 (+0200) Subject: fix order and correct association of languages and audio stream files and set a limit... X-Git-Tag: 3.0.0~24^2 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/8a1d65ce95fd4b583eec9cf65c9a0f5044008d79 fix order and correct association of languages and audio stream files and set a limit of 8 (fixes bug #596) --- diff --git a/lib/python/Plugins/Extensions/DVDBurn/Process.py b/lib/python/Plugins/Extensions/DVDBurn/Process.py index b64541b6..e00dedd9 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Process.py +++ b/lib/python/Plugins/Extensions/DVDBurn/Process.py @@ -95,6 +95,8 @@ class DemuxTask(Task): self.relevantAudioPIDs = [ ] self.getRelevantAudioPIDs(title) self.generated_files = [ ] + self.mplex_audiofiles = { } + self.mplex_videofile = "" self.mplex_streamfiles = [ ] if len(self.cutlist) > 1: self.args += [ "-cut", self.cutfile ] @@ -132,8 +134,10 @@ class DemuxTask(Task): def haveNewFile(self, file): print "[DemuxTask] produced file:", file, self.currentPID self.generated_files.append(file) - if self.currentPID in self.relevantAudioPIDs or file.endswith("m2v"): - self.mplex_streamfiles.append(file) + if self.currentPID in self.relevantAudioPIDs: + self.mplex_audiofiles[self.currentPID] = file + elif file.endswith("m2v"): + self.mplex_videofile = file def haveProgress(self, progress): #print "PROGRESS [%s]" % progress @@ -167,6 +171,12 @@ class DemuxTask(Task): f.close() def cleanup(self, failed): + print "[DemuxTask::cleanup]" + self.mplex_streamfiles = [ self.mplex_videofile ] + for pid in self.relevantAudioPIDs: + self.mplex_streamfiles.append(self.mplex_audiofiles[pid]) + print self.mplex_streamfiles + if failed: import os for file in self.generated_files: diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py b/lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py index a52fad9f..71a7f239 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py +++ b/lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py @@ -32,9 +32,9 @@ class TitleCutter(CutListEditor): pid = str(i.getPID()) if description == "MPEG": description = "MP2" - print "[audiotrack] pid:", pid, "description:", description, "language:", DVB_lang + print "[audiotrack] pid:", pid, "description:", description, "language:", DVB_lang, "count:", x, "active:", (x < 8) self.t.properties.audiotracks.append(ConfigSubsection()) - self.t.properties.audiotracks[-1].active = ConfigYesNo(default = True) + self.t.properties.audiotracks[-1].active = ConfigYesNo(default = (x < 8)) self.t.properties.audiotracks[-1].format = ConfigFixedText(description) self.t.properties.audiotracks[-1].language = ConfigSelection(choices = languageChoices.choices, default=languageChoices.getLanguage(DVB_lang)) self.t.properties.audiotracks[-1].pid = ConfigFixedText(pid)