[gnome-music/wip/mschraal/coverart: 5/5] albumartcache: Cleanup callback argument



commit 4f07d0d08b129d74a0bbeffb788bfef14cf41603
Author: Marinus Schraal <mschraal src gnome org>
Date:   Mon Oct 3 17:11:17 2016 +0200

    albumartcache: Cleanup callback argument

 gnomemusic/albumartcache.py |    2 +-
 gnomemusic/mpris.py         |    2 +-
 gnomemusic/player.py        |    6 +++---
 gnomemusic/view.py          |    4 ++--
 gnomemusic/widgets.py       |    6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gnomemusic/albumartcache.py b/gnomemusic/albumartcache.py
index 142b251..13cd14f 100644
--- a/gnomemusic/albumartcache.py
+++ b/gnomemusic/albumartcache.py
@@ -252,7 +252,7 @@ class AlbumArtCache(GObject.GObject):
                 item.set_thumbnail(GLib.filename_to_uri(thumb_file.get_path(),
                                                         None))
 
-            GLib.idle_add(callback, surface, None, itr)
+            GLib.idle_add(callback, surface, itr)
             return
 
         success, thumb_file = MediaArt.get_file(artist, album, "album")
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index fbd59fe..fe450de 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -420,7 +420,7 @@ class MediaPlayer2Service(Server):
                                [])
 
     @log
-    def _on_thumbnail_updated(self, player, path, data=None):
+    def _on_thumbnail_updated(self, player, data=None):
         self.PropertiesChanged(MediaPlayer2Service.MEDIA_PLAYER2_PLAYER_IFACE,
                                {
                                    'Metadata': GLib.Variant('a{sv}', self._get_metadata()),
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 99dee75..c22c2ee 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -91,7 +91,7 @@ class Player(GObject.GObject):
         'volume-changed': (GObject.SignalFlags.RUN_FIRST, None, ()),
         'prev-next-invalidated': (GObject.SignalFlags.RUN_FIRST, None, ()),
         'seeked': (GObject.SignalFlags.RUN_FIRST, None, (int,)),
-        'thumbnail-updated': (GObject.SignalFlags.RUN_FIRST, None, (str,)),
+        'thumbnail-updated': (GObject.SignalFlags.RUN_FIRST, None, ()),
     }
 
     def __repr__(self):
@@ -661,10 +661,10 @@ class Player(GObject.GObject):
         return False
 
     @log
-    def _on_cache_lookup(self, pixbuf, path, data=None):
+    def _on_cache_lookup(self, pixbuf, data=None):
         if pixbuf is not None:
             self.coverImg.set_from_surface(pixbuf)
-        self.emit('thumbnail-updated', path)
+        self.emit('thumbnail-updated')
 
     @log
     def play(self):
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index ed3b8b5..d195660 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -264,7 +264,7 @@ class ViewContainer(Gtk.Stack):
                           self._on_lookup_ready, _iter)
 
     @log
-    def _on_lookup_ready(self, surface, path, _iter):
+    def _on_lookup_ready(self, surface, _iter):
         if surface:
             pixbuf = Gdk.pixbuf_get_from_surface(surface, 0, 0,
                                                  surface.get_width(),
@@ -548,7 +548,7 @@ class Albums(ViewContainer):
             if self.selection_mode:
                 child.check.set_active(True)
 
-    def _on_lookup_ready(self, icon, path, child):
+    def _on_lookup_ready(self, icon, child):
         child.image.set_from_surface(icon)
 
     @log
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index 3787d1e..e2a9c28 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -299,7 +299,7 @@ class AlbumWidget(Gtk.EventBox):
         self._album = album
         self._ui.get_object('cover').set_from_surface(
             self._loading_icon_surface)
-        self._cache.lookup(item, ArtSize.large, self._on_look_up, None)
+        self._cache.lookup(item, ArtSize.large, self._on_lookup, None)
         self._duration = 0
         self._create_model()
         GLib.idle_add(grilo.populate_album_songs, item, self.add_item)
@@ -388,7 +388,7 @@ class AlbumWidget(Gtk.EventBox):
                 _("%d min") % (int(self._duration / 60) + 1))
 
     @log
-    def _on_look_up(self, surface, path, data=None):
+    def _on_lookup(self, surface, data=None):
         """Albumart retrieved callback.
 
         :param surface: The Cairo surface retrieved
@@ -731,7 +731,7 @@ class ArtistAlbumWidget(Gtk.Box):
                            None)
 
     @log
-    def _get_album_cover(self, surface, path, data=None):
+    def _get_album_cover(self, surface, data=None):
         if not surface:
             surface = self._no_artwork_icon_surface
         self.cover.set_from_surface(surface)


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