diff options
| author | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-12 20:21:40 +0100 |
|---|---|---|
| committer | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-12 20:21:40 +0100 |
| commit | fe84ecfad2cf93cc571f2d96de3e30b6c7297416 (patch) | |
| tree | 6219e2a8591c8f34bbecd8d5023a297f18b16871 /lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py | |
| parent | 6e4252048719916fbe136dbe2a22eea0bbac9a7e (diff) | |
| download | enigma2-fe84ecfad2cf93cc571f2d96de3e30b6c7297416.tar.gz enigma2-fe84ecfad2cf93cc571f2d96de3e30b6c7297416.zip | |
allow switching between simple and complex (multiple) titleset authoring mode, move autochapter from project settings to title properties.
Diffstat (limited to 'lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py')
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py b/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py index 1ada9ce2..26f51e63 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py @@ -6,10 +6,6 @@ class ConfigFixedText(ConfigText): def handleKey(self, key): pass -class ConfigActiveTrack(ConfigYesNo): - def __init__(self, default = True): - ConfigYesNo.__init__(self, default) - class DVDTitle: def __init__(self): self.properties = ConfigSubsection() @@ -20,6 +16,7 @@ class DVDTitle: self.DVBchannel = _("Channel") 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() self.cuesheet = [ ] self.source = None @@ -139,19 +136,22 @@ class DVDTitle: 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) - def getChapterMarks(self): - timestamps = [] - for p in self.chaptermarks: + timestamps = [ ] + chapters = [ ] + minutes = self.properties.autochapter.getValue() + if len(self.chaptermarks) < 1 and minutes > 0: + chapterpts = 0 + while chapterpts < (self.length-60*minutes)*90000: + chapterpts += 90000 * 60 * minutes + chapters.append(chapterpts) + 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 return timestamps
\ No newline at end of file |
