diff options
Diffstat (limited to 'lib/python/Plugins')
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/DVDProject.py | 32 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/DreamboxDVDtemplate.ddvdp.xml | 18 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/Makefile.am | 3 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/Process.py | 3 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py | 24 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py | 7 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/TitleList.py | 6 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg | bin | 0 -> 187417 bytes | |||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/silence.mp2 | bin | 0 -> 8340 bytes | |||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/vmgmblank.mpg | bin | 0 -> 24576 bytes | |||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg | bin | 0 -> 575488 bytes |
11 files changed, 65 insertions, 28 deletions
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py index cfad6774..962b34cb 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py @@ -1,3 +1,4 @@ + from Tools.Directories import fileExists from Components.config import config, ConfigSubsection, ConfigInteger, ConfigYesNo, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence @@ -9,24 +10,41 @@ class ConfigPixelvals(ConfigSequence): def __init__(self): ConfigSequence.__init__(self, seperator = ",", limits = [(0,200),(0,200),(0,200)]) +class ConfigPixelvals(ConfigSequence): + def __init__(self): + ConfigSequence.__init__(self, seperator = ",", limits = [(0,200),(0,200),(0,200)]) + +class ConfigFilename(ConfigText): + def __init__(self): + ConfigText.__init__(self, default = "", fixed_size = True, visible_width = False) + + def getMulti(self, selected): + filename = (self.text.rstrip("/").rsplit("/",1))[1].encode("utf-8")[:40] + " " + print "ConfigFilename =", filename + if self.allmarked: + mark = range(0, len(filename)) + else: + mark = [filename] + return ("mtext"[1-selected:], filename, mark) + class DVDProject: def __init__(self): self.titles = [ ] self.target = None self.settings = ConfigSubsection() - self.settings.name = ConfigText(visible_width = 40) + self.settings.name = ConfigText(fixed_size = False, visible_width = 40) self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ]) - self.settings.menubg = ConfigText(visible_width = 40) - self.settings.menuaudio = ConfigText(visible_width = 40) - self.settings.titleformat = ConfigText(visible_width = 40) - self.settings.subtitleformat = ConfigText(visible_width = 40) + self.settings.menubg = ConfigFilename() + self.settings.menuaudio = ConfigFilename() + self.settings.titleformat = ConfigText(fixed_size = False, visible_width = 40) + self.settings.subtitleformat = ConfigText(fixed_size = False, visible_width = 40) self.settings.color_headline = ConfigColor() self.settings.color_highlight = ConfigColor() self.settings.color_button = ConfigColor() - self.settings.font_face = ConfigText(visible_width = 40) + self.settings.font_face = ConfigFilename() self.settings.font_size = ConfigPixelvals() self.settings.space = ConfigPixelvals() - self.settings.vmgm = ConfigText(visible_width = 40) + self.settings.vmgm = ConfigFilename() self.settings.autochapter = ConfigInteger(default = 0, limits = (0, 99)) self.filekeys = ["vmgm", "menubg", "menuaudio", "font_face"] diff --git a/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVDtemplate.ddvdp.xml b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVDtemplate.ddvdp.xml new file mode 100644 index 00000000..cb358648 --- /dev/null +++ b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVDtemplate.ddvdp.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8" ?> +<DreamDVDBurnerProject> + <settings + name="Dreambox DVD record" + authormode="linked_nomenu" + titleformat="$i. $t" + subtitleformat="$D.$M.$Y, $T $C, $d ($c chapters)" + vmgm="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg" + menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg" + menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2" + color_button="[8, 0, 0]" + color_highlight="[0, 192, 192]" + color_headline="[0, 0, 128]" + font_face="/usr/share/fonts/nmsbd.ttf" + font_size="[48, 28, 16]" + space="[120, 36, 30]" /> + <titles> </titles> +</DreamDVDBurnerProject> diff --git a/lib/python/Plugins/Extensions/DVDBurn/Makefile.am b/lib/python/Plugins/Extensions/DVDBurn/Makefile.am index 886876cc..3b2f4484 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Makefile.am +++ b/lib/python/Plugins/Extensions/DVDBurn/Makefile.am @@ -5,6 +5,5 @@ install_PYTHON = \ plugin.py \ DVDProject.py DVDTitle.py TitleCutter.py TitleList.py Process.py ProjectSettings.py -install_DATA = keymap.xml +install_DATA = *.xml *.jpg *.mpg *.mp2 -SUBDIRS = data template diff --git a/lib/python/Plugins/Extensions/DVDBurn/Process.py b/lib/python/Plugins/Extensions/DVDBurn/Process.py index 12d85b45..67654f61 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Process.py +++ b/lib/python/Plugins/Extensions/DVDBurn/Process.py @@ -345,6 +345,7 @@ def formatTitle(template, title, track): template = template.replace("$t", title.name) template = template.replace("$d", title.descr) template = template.replace("$c", str(len(title.chaptermarks)+1)) + template = template.replace("$A", str(title.audiotracks)) template = template.replace("$f", title.inputfile) template = template.replace("$C", title.channel) l = title.length @@ -524,7 +525,7 @@ def CreateAuthoringXML(job): authorxml.append(' <titles>\n') for i in range( nr_titles ): for audiotrack in job.project.titles[i].audiotracks: - authorxml.append(' <audio format="'+audiotrack[0]+'" lang="'+audiotrack[1]+'" />\n') + authorxml.append(' <audio lang="'+audiotrack[0][:2]+'" format="'+audiotrack[1]+'" />\n') chapters = ','.join(["%d:%02d:%02d.%03d" % (p / (90000 * 3600), p % (90000 * 3600) / (90000 * 60), p % (90000 * 60) / 90000, (p % 90000) / 90) for p in job.project.titles[i].chaptermarks]) title_no = i+1 title_filename = job.workspace + "/dvd_title_%d.mpg" % (title_no) diff --git a/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py b/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py index 3686722d..fc8672c5 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py +++ b/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py @@ -9,7 +9,7 @@ from Components.Sources.StaticText import StaticText from Components.Sources.Progress import Progress from Components.FileList import FileList from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT -from Tools.Directories import resolveFilename, SCOPE_PLAYLIST, SCOPE_SKIN, SCOPE_FONTS +from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_FONTS from Components.config import config, getConfigListEntry from Components.ConfigList import ConfigListScreen @@ -41,16 +41,16 @@ class FileBrowser(Screen, HelpableScreen): pattern = "" currDir = "/" if self.scope == "project": - currDir = resolveFilename(SCOPE_PLAYLIST) + currDir = self.getDir() pattern = "(?i)^.*\.(ddvdp\.xml)" if self.scope == "menubg": - currDir = self.getDir(settings.menubg, resolveFilename(SCOPE_SKIN)) + currDir = self.getDir(settings.menubg) pattern = "(?i)^.*\.(jpeg|jpg|jpe|png|bmp)" elif self.scope == "menuaudio": - currDir = self.getDir(settings.menuaudio, resolveFilename(SCOPE_SKIN)) + currDir = self.getDir(settings.menuaudio) pattern = "(?i)^.*\.(mp2|m2a|ac3)" elif self.scope == "vmgm": - currDir = self.getDir(settings.vmgm, resolveFilename(SCOPE_SKIN)) + currDir = self.getDir(settings.vmgm) pattern = "(?i)^.*\.(mpg|mpeg)" elif self.scope == "font_face": currDir = self.getDir(settings.font_face, resolveFilename(SCOPE_FONTS)) @@ -65,12 +65,12 @@ class FileBrowser(Screen, HelpableScreen): "cancel": self.exit }) - def getDir(self, key, defaultDir): - settingDir = key.getValue() - if len(settingDir) > 1: - return (settingDir.rstrip("/").rsplit("/",1))[0] - else: - return defaultDir + def getDir(self, key=None, defaultDir=None): + if key: + settingDir = key.getValue() + if len(settingDir) > 1: + return (settingDir.rstrip("/").rsplit("/",1))[0] + return defaultDir or (resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/") def ok(self): if self.filelist.canDescent(): @@ -106,7 +106,7 @@ class ProjectSettings(Screen,ConfigListScreen): self["key_yellow"] = StaticText(_("Load")) self["key_blue"] = StaticText(_("Save")) - infotext = _("Available format variables") + ":\n%i=" + _("Track") + ", %t=" + _("Title") + ", %d=" + _("Description") + ", %l=" + _("length") + ", %c=" + _("chapters") + ",\n" + _("Record") + " %T=" + _("Begin time") + ", %Y=" + _("year") + ", %M=" + _("month") + ", %D=" + _("day") + ",\n%C=" + _("Channel") + ", %f=" + _("filename") + infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename") self["info"] = StaticText(infotext) self.settings = project.settings diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py b/lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py index 8f1adf1a..75a53a08 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py +++ b/lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py @@ -1,5 +1,6 @@ from Plugins.Extensions.CutListEditor.plugin import CutListEditor from Components.ServiceEventTracker import ServiceEventTracker +from enigma import iPlayableService class TitleCutter(CutListEditor): def __init__(self, session, t): @@ -23,11 +24,11 @@ class TitleCutter(CutListEditor): if n > 0: for x in range(n): i = audio.getTrackInfo(x) - language = i.getLanguage()[:2] + language = i.getLanguage() description = i.getDescription() if description == "MPEG": - description = "mp2" - self.t.audiotracks.append((description, language)) + description = "MP2" + self.t.audiotracks.append((language, description)) print "audiotracks", self.t.audiotracks def exit(self): diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py index 6fcc326e..fc4460e3 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py +++ b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py @@ -11,7 +11,7 @@ from Components.Sources.Progress import Progress from Components.FileList import FileList from Components.Label import Label from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT -from Tools.Directories import resolveFilename, SCOPE_PLAYLIST +from Tools.Directories import resolveFilename, SCOPE_PLUGINS class TitleList(Screen): skin = """ @@ -130,7 +130,7 @@ class TitleList(Screen): if source is None: return None t = self.project.addService(source) - self.editTitle(t, readOnly=True) + self.editTitle(t, readOnly=False) def removeCurrentTitle(self): title = self.getCurrentTitle() @@ -147,7 +147,7 @@ class TitleList(Screen): self["title_label"].text = _("Table of content for collection") + " \"" + self.project.settings.name.getValue() + "\":" def loadTemplate(self): - filename = resolveFilename(SCOPE_PLAYLIST)+"DreamboxDVDtemplate.ddvdp.xml" + filename = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/DreamboxDVDtemplate.ddvdp.xml" if self.project.loadProject(filename): self["error_label"].hide() return True diff --git a/lib/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg b/lib/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg Binary files differnew file mode 100644 index 00000000..a5256e28 --- /dev/null +++ b/lib/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg diff --git a/lib/python/Plugins/Extensions/DVDBurn/silence.mp2 b/lib/python/Plugins/Extensions/DVDBurn/silence.mp2 Binary files differnew file mode 100644 index 00000000..e8a817f8 --- /dev/null +++ b/lib/python/Plugins/Extensions/DVDBurn/silence.mp2 diff --git a/lib/python/Plugins/Extensions/DVDBurn/vmgmblank.mpg b/lib/python/Plugins/Extensions/DVDBurn/vmgmblank.mpg Binary files differnew file mode 100644 index 00000000..8e661682 --- /dev/null +++ b/lib/python/Plugins/Extensions/DVDBurn/vmgmblank.mpg diff --git a/lib/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg b/lib/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg Binary files differnew file mode 100644 index 00000000..4797986f --- /dev/null +++ b/lib/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg |
