Merge branch 'master' of /home/tmbinc/enigma2-git into tmbinc/FixTimingBugs
[enigma2.git] / lib / python / Components / FileList.py
index 7801c5567cf60e1f7740b9c97ec1ec7455c7628e..84abf32863b1bdd14b03290a2fae2c6f3447910f 100644 (file)
@@ -10,6 +10,8 @@ from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, \
 from Tools.LoadPixmap import LoadPixmap
 
 EXTENSIONS = {
+               "m4a": "music",
+               "mp2": "music",
                "mp3": "music",
                "wav": "music",
                "ogg": "music",
@@ -20,6 +22,7 @@ EXTENSIONS = {
                "bmp": "picture",
                "ts": "movie",
                "avi": "movie",
+               "divx": "movie",
                "mpg": "movie",
                "mpeg": "movie",
                "mkv": "movie",
@@ -116,8 +119,6 @@ class FileList(MenuList):
        def changeDir(self, directory, select = None):
                self.list = []
 
-               if directory and not os_path.isdir(directory):
-                       directory = None
                # if we are just entering from the list of mount points:
                if self.current_directory is None:
                        if directory and self.showMountpoints:
@@ -135,6 +136,9 @@ class FileList(MenuList):
                                        self.list.append(FileEntryComponent(name = p.description, absolute = path, isDir = True))
                        files = [ ]
                        directories = [ ]
+               elif directory is None:
+                       files = [ ]
+                       directories = [ ]
                elif self.useServiceRef:
                        root = eServiceReference("2:0:1:0:0:0:0:0:0:0:" + directory)
                        if self.additional_extensions: