aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2008-11-13 13:01:17 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2008-11-13 13:01:17 +0100
commit100681320b09e764b447b00a22cb3ee53d15edf7 (patch)
tree08caed88f758c5fa5216ae55b8e5d4d28eda9580 /lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py
parent4946a987277adbbd057e4d82d54e7e4ef688e419 (diff)
downloadenigma2-100681320b09e764b447b00a22cb3ee53d15edf7.tar.gz
enigma2-100681320b09e764b447b00a22cb3ee53d15edf7.zip
improve audio language detection
Diffstat (limited to 'lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py')
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py13
1 files changed, 6 insertions, 7 deletions
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