aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2010-12-20 12:18:19 +0100
committerAndreas Oberritter <obi@opendreambox.org>2010-12-20 12:18:19 +0100
commit16c07b98245e94a162685803acd4ba4b5d4298a3 (patch)
treee44802522d3c141ccc98e52a80016b862f60cf55 /lib/python/Plugins/Extensions
parent0fff842a5f2b4185257aadb6b6a3dfa033a91d72 (diff)
parent0cbccde1b0264df7a0a5f8723b8de881f0d5f927 (diff)
downloadenigma2-16c07b98245e94a162685803acd4ba4b5d4298a3.tar.gz
enigma2-16c07b98245e94a162685803acd4ba4b5d4298a3.zip
Merge branch 'master' into obi/master
Conflicts: main/Makefile.am
Diffstat (limited to 'lib/python/Plugins/Extensions')
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/DVDProject.py9
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml6
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml10
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml10
-rwxr-xr-xlib/python/Plugins/Extensions/DVDPlayer/plugin.py19
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp6
6 files changed, 45 insertions, 15 deletions
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
index 7f755db4..6dbcd499 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
@@ -2,6 +2,7 @@ from Tools.Directories import fileExists
from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigSubList
import DVDTitle
import xml.dom.minidom
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_FONTS
class ConfigColor(ConfigSequence):
def __init__(self, default = [128,128,128]):
@@ -125,6 +126,14 @@ class DVDProject:
for key in self.filekeys:
val = self.settings.dict()[key].getValue()
if not fileExists(val):
+ if val[0] != "/":
+ if key.find("font") == 0:
+ val = resolveFilename(SCOPE_FONTS)+val
+ else:
+ val = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/"+val
+ if fileExists(val):
+ self.settings.dict()[key].setValue(val)
+ continue
self.error += "\n%s '%s' not found" % (key, val)
#except AttributeError:
#print "loadProject AttributeError", self.error
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml
index 451e8a8b..4645260d 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml
+++ b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml
@@ -3,11 +3,11 @@
<settings
name="Dreambox DVD record"
authormode="menu_linked"
- menutemplate="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml"
+ menutemplate="Thumbs_menu_clouds.ddvdm.xml"
titlesetmode="multi"
- vmgm="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg"
+ vmgm="vmgmdream.mpg"
output="dvd"
- isopath="/media/hdd/movie/"
+ isopath="/hdd/movie/"
dataformat="iso9660_4"
/>
<titles> </titles>
diff --git a/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml b/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml
index 0de7f4b6..bf6356a9 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml
+++ b/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml
@@ -3,17 +3,17 @@
<settings
titleformat="$i. $t"
subtitleformat="$D.$M.$Y, $T $C, $d"
- menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg"
- menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2"
+ menubg="dreamdvd_boat.jpg"
+ menuaudio="silence.mp2"
dimensions="(720, 576)"
rows="5"
cols="1"
color_button="[8, 0, 0]"
color_highlight="[0, 192, 192]"
color_headline="[0, 0, 128]"
- fontface_headline="/usr/share/fonts/nmsbd.ttf"
- fontface_title="/usr/share/fonts/nmsbd.ttf"
- fontface_subtitle="/usr/share/fonts/nmsbd.ttf"
+ fontface_headline="nmsbd.ttf"
+ fontface_title="nmsbd.ttf"
+ fontface_subtitle="nmsbd.ttf"
fontsize_headline="46"
fontsize_title="24"
fontsize_subtitle="14"
diff --git a/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml b/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml
index c00c3fee..074f2037 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml
+++ b/lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml
@@ -3,17 +3,17 @@
<settings
titleformat="$t"
subtitleformat="$d"
- menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_clouds.jpg"
- menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2"
+ menubg="dreamdvd_clouds.jpg"
+ menuaudio="silence.mp2"
dimensions="(720, 576)"
rows="2"
cols="2"
color_button="[8, 0, 0]"
color_highlight="[128, 0, 0]"
color_headline="[128, 0, 0]"
- fontface_headline="/usr/share/fonts/nmsbd.ttf"
- fontface_title="/usr/share/fonts/nmsbd.ttf"
- fontface_subtitle="/usr/share/fonts/nmsbd.ttf"
+ fontface_headline="nmsbd.ttf"
+ fontface_title="nmsbd.ttf"
+ fontface_subtitle="nmsbd.ttf"
fontsize_headline="46"
fontsize_title="18"
fontsize_subtitle="12"
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
index 64b4ae50..e1ab3ef4 100755
--- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
@@ -39,8 +39,11 @@ class FileBrowser(Screen):
currDir = "/media/dvd/"
if not pathExists(currDir):
currDir = "/"
+ if lastpath == "": # 'None' is magic to start at the list of mountpoints
+ currDir = None
- self.filelist = FileList(currDir, matchingPattern = "(?i)^.*\.(iso)", useServiceRef = True)
+ inhibitDirs = ["/bin", "/boot", "/dev", "/etc", "/home", "/lib", "/proc", "/sbin", "/share", "/sys", "/tmp", "/usr", "/var"]
+ self.filelist = FileList(currDir, matchingPattern = "(?i)^.*\.(iso|img)", useServiceRef = True)
self["filelist"] = self.filelist
self["FilelistActions"] = ActionMap(["SetupActions"],
@@ -79,6 +82,12 @@ class FileBrowser(Screen):
lastpath = (pathname.rstrip("/").rsplit("/",1))[0]
print "lastpath video_ts.ifo=", lastpath
self.close(pathname)
+ if fileExists(pathname+"VIDEO_TS/VIDEO_TS.IFO"):
+ print "dvd structure found, trying to open..."
+ lastpath = (pathname.rstrip("/").rsplit("/",1))[0]
+ print "lastpath video_ts.ifo=", lastpath
+ pathname += "VIDEO_TS"
+ self.close(pathname)
else:
lastpath = filename[0:filename.rfind("/")]
print "lastpath directory=", lastpath
@@ -625,6 +634,14 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
newref = eServiceReference(4369, 0, val)
print "play", newref.toString()
if curref is None or curref != newref:
+ if newref.toString().endswith("/VIDEO_TS") or newref.toString().endswith("/"):
+ names = newref.toString().rsplit("/",3)
+ if names[2].startswith("Disk ") or names[2].startswith("DVD "):
+ name = str(names[1]) + " - " + str(names[2])
+ else:
+ name = names[2]
+ print "setting name to: ", self.service
+ newref.setName(str(name))
self.session.nav.playService(newref)
self.service = self.session.nav.getCurrentService()
print "self.service", self.service
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
index 2ba53927..5fbfb0aa 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
+++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
@@ -32,6 +32,7 @@ eServiceFactoryDVD::eServiceFactoryDVD()
{
std::list<std::string> extensions;
extensions.push_back("iso");
+ extensions.push_back("img");
sc->addServiceFactory(eServiceFactoryDVD::id, this, extensions);
}
}
@@ -480,7 +481,10 @@ RESULT eServiceDVD::getName(std::string &name)
if ( m_ddvd_titlestring[0] != '\0' )
name = m_ddvd_titlestring;
else
- name = m_ref.path;
+ if ( !m_ref.name.empty() )
+ name = m_ref.name;
+ else
+ name = m_ref.path;
return 0;
}