[gnome-music] player: Add new signal for thumbnail update



commit 5b4008cf54425c3f2b9248672e62e6a94edc1ccf
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Sat Sep 14 21:16:09 2013 +0800

    player: Add new signal for thumbnail update
    
    We no longer resolves the thumbnail path when populating the views, so
    get_thumbnail() is unusable on all media on first play.
    
    This opens a way to tell when the thumbnail becomes available.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708102

 gnomemusic/player.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 932bafd..3cd42a8 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -66,6 +66,7 @@ class Player(GObject.GObject):
         'volume-changed': (GObject.SIGNAL_RUN_FIRST, None, ()),
         'prev-next-invalidated': (GObject.SIGNAL_RUN_FIRST, None, ()),
         'seeked': (GObject.SIGNAL_RUN_FIRST, None, (int,)),
+        'thumbnail-updated': (GObject.SIGNAL_RUN_FIRST, None, (str,)),
     }
 
     def __init__(self):
@@ -359,6 +360,7 @@ class Player(GObject.GObject):
     def _on_cache_lookup(self, pixbuf, path, data=None):
         if pixbuf is not None:
             self.coverImg.set_from_pixbuf(pixbuf)
+        self.emit('thumbnail-updated', path)
 
     def play(self):
         if self.playlist is None:


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