X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FFileList.py;h=e028ec3a1864c8a4c64cc50f3a548678d260c465;hb=d732b430ccc1d1a78e666f16553b2e3c5dd131a8;hp=54106fba2e7fb98f709326eaa70f24e43c46f84d;hpb=100dc74896a9b2a921770118caaa104dae1a408c;p=vuplus_dvbapp diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py index 54106fb..e028ec3 100644 --- a/lib/python/Components/FileList.py +++ b/lib/python/Components/FileList.py @@ -1,19 +1,20 @@ -import re - +from re import compile as re_compile from os import path as os_path, listdir from MenuList import MenuList from Components.Harddisk import harddiskmanager from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename -from enigma import RT_HALIGN_LEFT, eListbox, eListboxPythonMultiContent, \ +from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, \ eServiceReference, eServiceCenter, gFont from Tools.LoadPixmap import LoadPixmap EXTENSIONS = { + "mp2": "music", "mp3": "music", "wav": "music", "ogg": "music", + "flac": "music", "jpg": "picture", "jpeg": "picture", "png": "picture", @@ -23,7 +24,7 @@ EXTENSIONS = { "mpg": "movie", "mpeg": "movie", "mkv": "movie", - "avi": "movie", + "mp4": "movie" } def FileEntryComponent(name, absolute = None, isDir = False): @@ -184,7 +185,7 @@ class FileList(MenuList): path = directory + x name = x - if (self.matchingPattern is None) or re.compile(self.matchingPattern).search(path): + if (self.matchingPattern is None) or re_compile(self.matchingPattern).search(path): self.list.append(FileEntryComponent(name = name, absolute = x , isDir = False)) self.l.setList(self.list)