self["titleactions"] = HelpableActionMap(self, "DVDTitleList",
{
"addTitle": (self.addTitle, _("Add a new title"), _("Add title")),
- "titleProperties": (self.titleProperties, ("Properties of current title"), _("Title properties")),
+ "titleProperties": (self.titleProperties, _("Properties of current title"), _("Title properties")),
"removeCurrentTitle": (self.removeCurrentTitle, _("Remove currently selected title"), _("Remove title")),
"settings": (self.settings, _("Collection settings"), _("Settings")),
"burnProject": (self.burnProject, _("Burn DVD"), _("Burn DVD")),
self["titles"] = List(list = [ ], enableWrapAround = True, item_height=30, fonts = [gFont("Regular", 20)])
self.updateTitleList()
-
+
+ def checkBackgroundJobs(self):
+ for job in job_manager.getPendingJobs():
+ print "type(job):", type(job)
+ print "Process.DVDJob:", Process.DVDJob
+ if type(job) == Process.DVDJob:
+ self.backgroundJob = job
+ return
+ self.backgroundJob = None
+
def showMenu(self):
menu = []
+ self.checkBackgroundJobs()
+ if self.backgroundJob:
+ j = self.backgroundJob
+ menu.append(("%s: %s (%d%%)" % (j.getStatustext(), j.name, int(100*j.progress/float(j.end))), self.showBackgroundJob))
if self.project.settings.output.getValue() == "dvd":
menu.append((_("Burn DVD"), self.burnProject))
elif self.project.settings.output.getValue() == "iso":
menu.append((_("DVD media toolbox"), self.toolbox))
menu.append((_("Preview menu"), self.previewMenu))
menu.append((_("Collection settings"), self.settings))
- menu.append(("Reset and renumerate title names", self.resetTitles))
+ menu.append((_("Reset and renumerate title names"), self.resetTitles))
menu.append((_("Edit chapters of current title"), self.editTitle))
- menu.append(("Properties of current title", self.titleProperties))
+ menu.append((_("Properties of current title"), self.titleProperties))
menu.append((_("Add a new title"), self.addTitle))
menu.append((_("Remove title"), self.removeCurrentTitle))
menu.append((_("Exit"), self.leave))
if choice:
choice[1]()
+ def showBackgroundJob(self):
+ job_manager.in_background = False
+ self.session.openWithCallback(self.JobViewCB, JobView, self.backgroundJob)
+ self.backgroundJob = None
+
def titleProperties(self):
if self.getCurrentTitle():
self.session.openWithCallback(self.updateTitleList, TitleProperties.TitleProperties, self, self.project, self["titles"].getIndex())
self["title_label"].text = _("Table of content for collection") + " \"" + self.project.settings.name.getValue() + "\":"
def loadTemplate(self):
- filename = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/DreamboxDVDtemplate.ddvdp.xml"
- if self.project.loadProject(filename):
+ filename = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/DreamboxDVD.ddvdp.xml"
+ if self.project.load(filename):
self["error_label"].hide()
return True
else:
job_manager.in_background = False
self.session.openWithCallback(self.JobViewCB, JobView, job)
else:
- autochapter = self.project.settings.autochapter.getValue()
- if autochapter > 0:
- for title in self.project.titles:
- title.produceAutoChapter(autochapter)
job = Process.DVDJob(self.project)
job_manager.AddJob(job)
job_manager.in_background = False
totalsize += title.estimatedDiskspace
self["titles"].list = res
self.updateSize(totalsize)
-
+
def updateSize(self, totalsize):
size = int((totalsize/1024)/1024)
max_SL = 4370