[gnome-music] view: Load playlist songs from Tracker



commit 6752292de72bc64dbfdd1aa760593476892245bc
Author: Arnel Borja <arnelborja src gnome org>
Date:   Thu May 29 20:46:29 2014 +0800

    view: Load playlist songs from Tracker

 gnomemusic/view.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 329878e..cbae55f 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -1006,17 +1006,18 @@ class Playlist(ViewContainer):
     @log
     def _on_playlist_activated(self, widget, item_id, path):
         _iter = self.playlists_model.get_iter(path)
-        playlist = self.playlists_model.get_value(_iter, 2)
+        playlist_name = self.playlists_model.get_value(_iter, 2)
+        playlist = self.playlists_model.get_value(_iter, 5)
 
-        if self.current_playlist == playlist:
+        if self.current_playlist == playlist_name:
             return
 
-        self.current_playlist = playlist
-        self.name_label.set_text(playlist)
+        self.current_playlist = playlist_name
+        self.name_label.set_text(playlist_name)
 
         # if the active queue has been set by this playlist,
         # use it as model, otherwise build the liststore
-        cached_playlist = self.player.running_playlist('Playlist', playlist)
+        cached_playlist = self.player.running_playlist('Playlist', playlist_name)
         if cached_playlist:
             self._model = cached_playlist
             currentTrack = self.player.playlist.get_iter(self.player.currentTrack.get_path())
@@ -1040,7 +1041,7 @@ class Playlist(ViewContainer):
                 GObject.TYPE_BOOLEAN
             )
             self.view.set_model(self._model)
-            playlists.parse_playlist(playlist, self._add_item)
+            GLib.idle_add(grilo.populate_playlist_songs, playlist, self._add_item)
             self.songs_count = 0
             self._update_songs_count()
 


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