Commits

Vladimir Kolev committed f781325

Fixed remove from playlist action

  • Participants
  • Parent commits 95f62cc

Comments (0)

Files changed (1)

File gsharkdown.py

         """
         Removes an item from the playlist and the playitems list
         """
-        select = self.play_view.get_selection().get_selected()
-        if select[1] != None:
-            next = self.playlist.iter_next(select[1])
-            self.playlist.remove(select[1])
-            if select[1] == self.get_playing_iter():
+        select = self.play_view.get_selected_items()
+        selectiter = self.playlist.get_iter(select[0])
+        if selectiter != None:
+            next = self.playlist.iter_next(selectiter)
+            self.playlist.remove(selectiter)
+            if selectiter == self.get_playing_iter():
                 self.stop_play()
             if next != None:
-                self.play_view.get_selection().select_iter(next)
+                self.play_view.select_path((select[0][0] + 1,))
 
     def clear_playlist(self, widget, data = None):
         """