user correct playlist parser from dict
authorFraxinas <andreas.frisch@multimedia-labs.de>
Mon, 3 Nov 2008 08:01:50 +0000 (09:01 +0100)
committerAndreas Oberritter <obi@saftware.de>
Thu, 6 Nov 2008 00:52:04 +0000 (01:52 +0100)
lib/python/Plugins/Extensions/MediaPlayer/plugin.py

index 841ad61..ed1a887 100644 (file)
@@ -592,12 +592,13 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
        def PlaylistSelected(self,path):
                if path is not None:
                        self.clear_playlist()
-                       self.playlistIOInternal = PlaylistIOInternal()
-                       list = self.playlistIOInternal.open(path[1])
-                       if list:
+                       extension = path[0].rsplit('.',1)[-1]
+                       if self.playlistparsers.has_key(extension):
+                               playlist = self.playlistparsers[extension]()
+                               list = playlist.open(path[1])
                                for x in list:
                                        self.playlist.addFile(x.ref)
-                               self.playlist.updateList()
+                       self.playlist.updateList()
 
        def delete_saved_playlist(self):
                listpath = []