move media scanner components into core, patch by Moritz Venn (002_enigma2_move_media...
[enigma2.git] / lib / python / Plugins / Extensions / PicturePlayer / plugin.py
index 4462df139b9fc7008cd8b1c5844536a837540540..b6699bab00ab63e3346f199274449bdb029217da 100644 (file)
@@ -531,14 +531,14 @@ def main(session, **kwargs):
        session.open(picmain)
 
 def filescan_open(list, session, **kwargs):
-       session.open(picmain) # list
+       # Recreate List as expected by PicView
+       filelist = [((file.path, False), None) for file in list]
+       session.open(PicView, filelist, "", "")
 
 def filescan(**kwargs):
-       # we expect not to be called if the MediaScanner plugin is not available,
-       # thus we don't catch an ImportError exception here
-       from Plugins.Extensions.MediaScanner.plugin import Scanner, ScanPath
+       from Components.Scanner import Scanner, ScanPath
        return \
-               Scanner(extensions = ["jpg", "jpe", "jpeg"], 
+               Scanner(mimetypes = ["image/jpeg", "image/png", "image/gif", "image/bmp"],
                        paths_to_scan = 
                                [
                                        ScanPath(path = "DCIM", with_subdirs = True),