X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/3728486e40b02d9d316a7491d2b7b1e3577c1872..17cd8cc301444bb2c81b50c9e57f15ef1de0987a:/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py?ds=sidebyside diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py b/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py index dad16e7e..67b410ce 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py @@ -9,23 +9,30 @@ class DVDTitle: self.inputfile = "" self.cutlist = [ ] self.chaptermarks = [ ] + self.audiotracks = [ ] + self.timeCreate = None def addService(self, service): from os import path from enigma import eServiceCenter, iServiceInformation + from ServiceReference import ServiceReference + from time import localtime, time self.source = service serviceHandler = eServiceCenter.getInstance() info = serviceHandler.info(service) self.descr = info and " " + info.getInfoString(service, iServiceInformation.sDescription) or "" + sTimeCreate = info.getInfo(service, iServiceInformation.sTimeCreate) + if sTimeCreate > 1: + self.timeCreate = localtime(sTimeCreate) + serviceref = ServiceReference(info.getInfoString(service, iServiceInformation.sServiceref)) self.name = info and info.getName(service) or "Title" + t.descr + self.channel = serviceref.getServiceName() self.inputfile = service.getPath() self.filesize = path.getsize(self.inputfile) self.estimatedDiskspace = self.filesize self.length = info.getLength(service) def produceFinalCuesheet(self): - print "[produceFinalCuesheet] >>> ", self.inputfile, self.cuesheet - CUT_TYPE_IN = 0 CUT_TYPE_OUT = 1 CUT_TYPE_MARK = 2 @@ -64,11 +71,15 @@ class DVDTitle: reloc_pts = pts - last_in + accumulated_in self.chaptermarks.append(reloc_pts) - print "cutlist =", self.cutlist, "chaptermarks =", self.chaptermarks, "accumulated_in =", accumulated_in - if len(self.cutlist) > 1: part = accumulated_in / (self.length*90000.0) usedsize = int ( part * self.filesize ) - print "part=", part, "filesize=", self.filesize, "estimatedDiskspace=", usedsize self.estimatedDiskspace = usedsize self.length = accumulated_in / 90000 + + def produceAutoChapter(self, minutes): + if len(self.chaptermarks) < 1: + chapterpts = self.cutlist[0] + while chapterpts < self.length*90000: + chapterpts += 90000 * 60 * minutes + self.chaptermarks.append(chapterpts) \ No newline at end of file