[gnome-music/wip/jfelder/playlistview-random-song: 13/17] playlistview: Remove unecessary check



commit 9edc7f511d4afd1b290af19fab58df0b6a591675
Author: Jean Felder <jfelder src gnome org>
Date:   Mon Apr 15 17:23:28 2019 +0200

    playlistview: Remove unecessary check
    
    set_playlist method from the PlayerPlaylist also checks if the
    requested song can be played and tries to play the next song if
    necessary.

 gnomemusic/views/playlistview.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/views/playlistview.py b/gnomemusic/views/playlistview.py
index e43eee4b..0db24771 100644
--- a/gnomemusic/views/playlistview.py
+++ b/gnomemusic/views/playlistview.py
@@ -350,11 +350,10 @@ class PlaylistView(BaseView):
                 return
 
             _iter = self.model.get_iter(path)
-            if self.model[_iter][8] != self._error_icon_name:
-                self.player.set_playlist(
-                    PlayerPlaylist.Type.PLAYLIST,
-                    self._current_playlist.get_id(), self.model, _iter)
-                self.player.play()
+            playlist_id = self._current_playlist.get_id()
+            self.player.set_playlist(
+                PlayerPlaylist.Type.PLAYLIST, playlist_id, self.model, _iter)
+            self.player.play()
 
         # 'row-activated' signal is emitted before 'drag-begin' signal.
         # Need to wait to check if drag and drop operation is active.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]