refresh playlist when adding playlist via filelist. when copying directory to playlis...
[enigma2.git] / lib / python / Plugins / Extensions / MediaPlayer / plugin.py
index 841ad61468ae84649d22e7ed8096789263077fff..2233998c74bce7b7c4556bfc8002af97afc20daf 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 = []
@@ -631,7 +632,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                        if x[0][1] == True: #isDir
                                if recursive:
                                        self.copyDirectory(x[0][0])
-                       else:
+                       elif filelist.getServiceRef().type != 4098:
                                self.playlist.addFile(x[0][0])
                self.playlist.updateList()
 
@@ -645,6 +646,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                                list = playlist.open(ServiceRef.getPath())
                                for x in list:
                                        self.playlist.addFile(x.ref)
+                       self.playlist.updateList()
                else:
                        self.playlist.addFile(self.filelist.getServiceRef())
                        self.playlist.updateList()