X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/fe84ecfad2cf93cc571f2d96de3e30b6c7297416..a34ef895210161a8820e96829ac87806566e7858:/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py b/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py index 26f51e63..b1c627aa 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py @@ -14,7 +14,7 @@ class DVDTitle: self.DVBname = _("Title") self.DVBdescr = _("Description") self.DVBchannel = _("Channel") - self.properties.aspect = ConfigSelection(choices = [("4:3", "4:3"), ("16:9", "16:9")]) + self.properties.aspect = ConfigSelection(choices = [("4:3", _("4:3")), ("16:9", _("16:9"))]) self.properties.widescreen = ConfigSelection(choices = [("nopanscan", "nopanscan"), ("noletterbox", "noletterbox")]) self.properties.autochapter = ConfigInteger(default = 0, limits = (0, 60)) self.properties.audiotracks = ConfigSubList() @@ -136,7 +136,7 @@ class DVDTitle: self.estimatedDiskspace = usedsize self.length = accumulated_in / 90000 - def getChapterMarks(self): + def getChapterMarks(self, template="$h:$m:$s.$t"): timestamps = [ ] chapters = [ ] minutes = self.properties.autochapter.getValue() @@ -148,10 +148,9 @@ class DVDTitle: else: chapters = self.chaptermarks for p in chapters: - h = p / (90000 * 3600) - m = p % (90000 * 3600) / (90000 * 60) - s = p % (90000 * 60) / 90000 - ms = (p % 90000) / 90 - timestamps.append("%d:%02d:%02d.%03d" % (h, m, s, ms)) - print "timestamps:", timestamps + timestring = template.replace("$h", str(p / (90000 * 3600))) + timestring = timestring.replace("$m", ("%02d" % (p % (90000 * 3600) / (90000 * 60)))) + timestring = timestring.replace("$s", ("%02d" % (p % (90000 * 60) / 90000))) + timestring = timestring.replace("$t", ("%03d" % ((p % 90000) / 90))) + timestamps.append(timestring) return timestamps \ No newline at end of file