X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/aa4989974a32ab2437d51fb6352b3eb54cecd83d..08fca93e7f2a37a452399d08c5c84b969b7e52af:/lib/python/Plugins/Extensions/FileManager/plugin.py diff --git a/lib/python/Plugins/Extensions/FileManager/plugin.py b/lib/python/Plugins/Extensions/FileManager/plugin.py index a17e631c..e9dccbd6 100644 --- a/lib/python/Plugins/Extensions/FileManager/plugin.py +++ b/lib/python/Plugins/Extensions/FileManager/plugin.py @@ -22,7 +22,7 @@ class FileManager(Screen): self.skin = FileManager.skin Screen.__init__(self, session) - self["list"] = FileList("/", matchingPattern = "^.*\.(png|avi|mp3|mpeg|ts)") + self["list"] = FileList("/", matchingPattern = "^.*\.(png|avi|mp3|mpeg|ts)", useServiceRef = True) self["pixmap"] = Pixmap() #self["text"] = Input("1234", maxSize=True, type=Input.NUMBER) @@ -52,11 +52,11 @@ class FileManager(Screen): self["text"].right() def ok(self): - selection = self["list"].getSelection() - if selection[1] == True: # isDir - self["list"].changeDir(selection[0]) + + if self["list"].canDescent(): # isDir + self["list"].descent() else: - self["pixmap"].instance.setPixmapFromFile(selection[0]) + self["pixmap"].instance.setPixmapFromFile(self["list"].getSelection()) def keyNumberGlobal(self, number): print "pressed", number