diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2008-11-13 13:32:31 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2008-11-13 13:32:31 +0100 |
| commit | f479fb3234634c7e9464f1af81d64b97a08bb0bb (patch) | |
| tree | b531a97aa1a49c979976d81a8d1dbbc1aacafc39 /lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py | |
| parent | 58163e18dce8d07d32500c8b24e616518e40710b (diff) | |
| parent | 2c3fe3f9a4eabde0440dbf86fb39ac26062cdc65 (diff) | |
| download | enigma2-f479fb3234634c7e9464f1af81d64b97a08bb0bb.tar.gz enigma2-f479fb3234634c7e9464f1af81d64b97a08bb0bb.zip | |
Merge branch 'master' of git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py')
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py | 13 |
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 |
