reorder mainmenu to match previous order, patch by Moritz Venn (007_enigma2_fix_mainm...
[enigma2.git] / lib / python / Plugins / Extensions / MediaPlayer / plugin.py
index 06b6bfabfe2538205116d192bf6f7ff2b70a0da4..629e9684fbcda0f01ebda0dcd7d369d2ecfdd9c2 100644 (file)
@@ -707,7 +707,7 @@ def main(session, **kwargs):
 
 def menu(menuid, **kwargs):
        if menuid == "mainmenu":
-               return [(_("Media player"), main)]
+               return [(_("Media player"), main, "media_player", 45)]
        return []
 
 def filescan_open(list, session, **kwargs):
@@ -717,7 +717,7 @@ def filescan_open(list, session, **kwargs):
 
        mp.switchToPlayList()
        for file in list:
-               ref = eServiceReference(4097, 0, file)
+               ref = eServiceReference(4097, 0, file.path)
                mp.playlist.addFile(ref)
 
        # TODO: rather play first than last file?
@@ -725,9 +725,7 @@ def filescan_open(list, session, **kwargs):
        mp.playlist.updateList()
 
 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(mimetypes = ["video/mpeg"],
                        paths_to_scan =
@@ -752,6 +750,6 @@ def filescan(**kwargs):
 from Plugins.Plugin import PluginDescriptor
 def Plugins(**kwargs):
        return [
-               PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_SETUP, fnc = menu),
+               PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_MENU, fnc = menu),
                PluginDescriptor(name = "MediaPlayer", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)
        ]