DVDBurn... allow jumping from complex titleset titles to main disc menu. implement...
authorFraxinas <andreas.frisch@multimedia-labs.de>
Wed, 8 Jul 2009 09:07:31 +0000 (11:07 +0200)
committerFraxinas <andreas.frisch@multimedia-labs.de>
Wed, 8 Jul 2009 09:07:31 +0000 (11:07 +0200)
lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
lib/python/Plugins/Extensions/DVDBurn/Process.py
lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py

index 660234f20e1be4949f073c5ac75f7efb1d6d2fb1..96fc380a4162fa0bf1f3c5e624f1e5f054d12a30 100644 (file)
@@ -113,7 +113,7 @@ class DVDProject:
                          if project.nodeType == xml.dom.minidom.Element.nodeType:
                            if project.tagName == 'settings':
                                i = 0
                          if project.nodeType == xml.dom.minidom.Element.nodeType:
                            if project.tagName == 'settings':
                                i = 0
-                               if project.attributes.length < len(self.settings.dict()):
+                               if project.attributes.length < len(self.settings.dict())-1:
                                        self.error = "project attributes missing"
                                        raise AttributeError
                                while i < project.attributes.length:
                                        self.error = "project attributes missing"
                                        raise AttributeError
                                while i < project.attributes.length:
@@ -175,6 +175,8 @@ class MenuTemplate(DVDProject):
                self.settings.thumb_size = ConfigSequence(seperator = ',', default = [200,158], limits = [(0,576),(-1,720)])
                self.settings.thumb_border = ConfigInteger(default = 2, limits = (0, 20))
                self.filekeys = ["menubg", "menuaudio", "fontface_headline", "fontface_title", "fontface_subtitle"]
                self.settings.thumb_size = ConfigSequence(seperator = ',', default = [200,158], limits = [(0,576),(-1,720)])
                self.settings.thumb_border = ConfigInteger(default = 2, limits = (0, 20))
                self.filekeys = ["menubg", "menuaudio", "fontface_headline", "fontface_title", "fontface_subtitle"]
+               from TitleProperties import languageChoices
+               self.settings.menulang = ConfigSelection(choices = languageChoices.choices, default=languageChoices.choices[1][0])
 
        def loadTemplate(self, filename):
                ret = DVDProject.loadProject(self, filename)
 
        def loadTemplate(self, filename):
                ret = DVDProject.loadProject(self, filename)
index 5f22f139aa5a9ce8275bb31fe85524c564d1b1cb..80e5899b03d982f50619e8b6937060e1b8539cb6 100644 (file)
@@ -679,7 +679,7 @@ def CreateAuthoringXML_singleset(job):
        authorxml.append('<?xml version="1.0" encoding="utf-8"?>\n')
        authorxml.append(' <dvdauthor dest="' + (job.workspace+"/dvd") + '">\n')
        authorxml.append('  <vmgm>\n')
        authorxml.append('<?xml version="1.0" encoding="utf-8"?>\n')
        authorxml.append(' <dvdauthor dest="' + (job.workspace+"/dvd") + '">\n')
        authorxml.append('  <vmgm>\n')
-       authorxml.append('   <menus>\n')
+       authorxml.append('   <menus lang="' + job.project.menutemplate.settings.menulang.getValue() + '">\n')
        authorxml.append('    <pgc>\n')
        authorxml.append('     <vob file="' + job.project.settings.vmgm.getValue() + '" />\n', )
        if mode.startswith("menu"):
        authorxml.append('    <pgc>\n')
        authorxml.append('     <vob file="' + job.project.settings.vmgm.getValue() + '" />\n', )
        if mode.startswith("menu"):
@@ -691,7 +691,7 @@ def CreateAuthoringXML_singleset(job):
        authorxml.append('  </vmgm>\n')
        authorxml.append('  <titleset>\n')
        if mode.startswith("menu"):
        authorxml.append('  </vmgm>\n')
        authorxml.append('  <titleset>\n')
        if mode.startswith("menu"):
-               authorxml.append('   <menus>\n')
+               authorxml.append('   <menus lang="' + job.project.menutemplate.settings.menulang.getValue() + '">\n')
                authorxml.append('    <video aspect="4:3"/>\n')
                for menu_count in range(1 , job.nr_menus+1):
                        if menu_count == 1:
                authorxml.append('    <video aspect="4:3"/>\n')
                for menu_count in range(1 , job.nr_menus+1):
                        if menu_count == 1:
@@ -747,11 +747,14 @@ def CreateAuthoringXML_multiset(job):
        authorxml.append('<?xml version="1.0" encoding="utf-8"?>\n')
        authorxml.append(' <dvdauthor dest="' + (job.workspace+"/dvd") + '" jumppad="yes">\n')
        authorxml.append('  <vmgm>\n')
        authorxml.append('<?xml version="1.0" encoding="utf-8"?>\n')
        authorxml.append(' <dvdauthor dest="' + (job.workspace+"/dvd") + '" jumppad="yes">\n')
        authorxml.append('  <vmgm>\n')
-       authorxml.append('   <menus>\n')
+       authorxml.append('   <menus lang="' + job.project.menutemplate.settings.menulang.getValue() + '">\n')
        authorxml.append('    <video aspect="4:3"/>\n')
        if mode.startswith("menu"):
                for menu_count in range(1 , job.nr_menus+1):
        authorxml.append('    <video aspect="4:3"/>\n')
        if mode.startswith("menu"):
                for menu_count in range(1 , job.nr_menus+1):
-                       authorxml.append('    <pgc>\n')
+                       if menu_count == 1:
+                               authorxml.append('    <pgc>\n')
+                       else:
+                               authorxml.append('    <pgc>\n')
                        menu_start_title = (menu_count-1)*job.titles_per_menu + 1
                        menu_end_title = (menu_count)*job.titles_per_menu + 1
                        if menu_end_title > nr_titles:
                        menu_start_title = (menu_count-1)*job.titles_per_menu + 1
                        menu_end_title = (menu_count)*job.titles_per_menu + 1
                        if menu_end_title > nr_titles:
@@ -776,6 +779,13 @@ def CreateAuthoringXML_multiset(job):
        for i in range( nr_titles ):
                title = job.project.titles[i]
                authorxml.append('  <titleset>\n')
        for i in range( nr_titles ):
                title = job.project.titles[i]
                authorxml.append('  <titleset>\n')
+               authorxml.append('   <menus lang="' + job.project.menutemplate.settings.menulang.getValue() + '">\n')
+               authorxml.append('    <pgc entry="root">\n')
+               authorxml.append('     <pre>\n')
+               authorxml.append('      jump vmgm menu entry title;\n')
+               authorxml.append('     </pre>\n')
+               authorxml.append('    </pgc>\n')
+               authorxml.append('   </menus>\n')
                authorxml.append('   <titles>\n')
                for audiotrack in title.properties.audiotracks:
                        active = audiotrack.active.getValue()
                authorxml.append('   <titles>\n')
                for audiotrack in title.properties.audiotracks:
                        active = audiotrack.active.getValue()
index a8888da3cbad2715da86f8329b4dbb38105337c0..f95bbc36441131c2aac6691530e651c3768cedfd 100644 (file)
@@ -147,6 +147,7 @@ class ProjectSettings(Screen,ConfigListScreen):
                                self.list.append(getConfigListEntry(_("Menu")+' '+_("Title"), self.project.menutemplate.settings.titleformat))
                                self.list.append(getConfigListEntry(_("Menu")+' '+_("Subtitles"), self.project.menutemplate.settings.subtitleformat))
                                self.list.append(getConfigListEntry(_("Menu")+' '+_("background image"), self.project.menutemplate.settings.menubg))
                                self.list.append(getConfigListEntry(_("Menu")+' '+_("Title"), self.project.menutemplate.settings.titleformat))
                                self.list.append(getConfigListEntry(_("Menu")+' '+_("Subtitles"), self.project.menutemplate.settings.subtitleformat))
                                self.list.append(getConfigListEntry(_("Menu")+' '+_("background image"), self.project.menutemplate.settings.menubg))
+                               self.list.append(getConfigListEntry(_("Menu")+' '+_("Language selection"), self.project.menutemplate.settings.menulang))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("headline")+' '+_("color"), self.settings.color_headline))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("text")+' '+_("color"), self.settings.color_button))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("highlighted button")+' '+_("color"), self.settings.color_highlight))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("headline")+' '+_("color"), self.settings.color_headline))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("text")+' '+_("color"), self.settings.color_button))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("highlighted button")+' '+_("color"), self.settings.color_highlight))