Commit 8f4954be authored by Marinus Schraal's avatar Marinus Schraal

albumartcache: Cleanup callback argument

parent 263bdb05
......@@ -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")
......
......@@ -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()),
......
......@@ -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):
......
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment