aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins
diff options
context:
space:
mode:
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-04-16 20:11:25 +0000
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-04-16 20:11:25 +0000
commit0d1f59e4a4c6b096b18cac11876066e3384c4b3a (patch)
treeaeb0b7fba39c8e5adb6cb13fc06bfe4e5f0c485a /lib/python/Plugins
parentaeb9117180022110311b5ff0fcfefe35517d1a70 (diff)
downloadenigma2-0d1f59e4a4c6b096b18cac11876066e3384c4b3a.tar.gz
enigma2-0d1f59e4a4c6b096b18cac11876066e3384c4b3a.zip
Infobar toggleable with OK key and remember last file browser directory
Diffstat (limited to 'lib/python/Plugins')
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/plugin.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
index bab64ce1..3ecd9f8a 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py
@@ -19,6 +19,8 @@ from Tools.Directories import pathExists, fileExists
import random
import servicedvd # load c++ part of dvd player plugin
+lastpath = ""
+
class FileBrowser(Screen):
skin = """
<screen name="FileBrowser" position="100,100" size="520,376" title="DVD File Browser" >
@@ -26,7 +28,11 @@ class FileBrowser(Screen):
</screen>"""
def __init__(self, session):
Screen.__init__(self, session)
- currDir = "/media/dvd/"
+ global lastpath
+ if lastpath is not None:
+ currDir = lastpath + "/"
+ else:
+ currDir = "/media/dvd/"
if not pathExists(currDir):
currDir = "/"
#else:
@@ -41,15 +47,18 @@ class FileBrowser(Screen):
})
def ok(self):
+ global lastpath
filename = self["filelist"].getFilename()
- if filename is not None and filename.upper().endswith("VIDEO_TS/"):
- print "dvd structure found, trying to open..."
- self.close(filename[0:-9])
- elif self["filelist"].canDescent(): # isDir
+ if filename is not None:
+ lastpath = filename[0:filename.rfind("/")]
+ if filename.upper().endswith("VIDEO_TS/"):
+ print "dvd structure found, trying to open..."
+ self.close(filename[0:-9])
+ if self["filelist"].canDescent(): # isDir
self["filelist"].descent()
else:
self.close(filename)
-
+
def exit(self):
self.close(None)
@@ -474,6 +483,8 @@ class DVDPlayer(Screen, InfoBarNotifications, InfoBarSeek, InfoBarCueSheetSuppor
def keyOk(self):
if self.service:
+ if not self.in_menu:
+ self.toggleInfo()
self.service.keys().keyPressed(iServiceKeys.keyOk)
def keyCancel(self):