From 100681320b09e764b447b00a22cb3ee53d15edf7 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Thu, 13 Nov 2008 13:01:17 +0100 Subject: improve audio language detection --- lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to '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..94e5c0f5 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py @@ -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 -- cgit v1.2.3