[gnome-music/gnome-3-12] widgets: Use artist name as playlist id for Artists view



commit 6ba98b0567501fbda6bd34580ec12448394f289d
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Wed Apr 9 15:45:59 2014 +0800

    widgets: Use artist name as playlist id for Artists view
    
    This allows the Artists view to easily lookup if the running playlist is
    from itself.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705852

 gnomemusic/widgets.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index c61ac4f..7435a64 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -416,7 +416,7 @@ class ArtistAlbums(Gtk.VBox):
 
     @log
     def add_album(self, album):
-        widget = ArtistAlbumWidget(album, self.player, self.model)
+        widget = ArtistAlbumWidget(self.artist, album, self.player, self.model)
         self._albumBox.pack_start(widget, False, False, 0)
         self.widgets.append(widget)
 
@@ -541,11 +541,11 @@ class AllArtistsAlbums(ArtistAlbums):
 class ArtistAlbumWidget(Gtk.HBox):
 
     @log
-    def __init__(self, album, player, model):
+    def __init__(self, artist, album, player, model):
         super(Gtk.HBox, self).__init__()
         self.player = player
         self.album = album
-        self.artist = album.get_string(Grl.METADATA_KEY_ARTIST)
+        self.artist = artist
         self.model = model
         self.songs = []
         self.monitors = []
@@ -646,7 +646,7 @@ class ArtistAlbumWidget(Gtk.HBox):
             return
 
         self.player.stop()
-        self.player.set_playlist('Artist', self.album,
+        self.player.set_playlist('Artist', self.artist,
                                  widget.model, widget._iter, 5)
         self.player.set_playing(True)
 


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