[gnome-music/wip/mschraal/coresong-thumbnail-prop: 9/21] corealbum: Add thumbnail prop



commit 085452234730298d9aa9730206a524305e13f247
Author: Marinus Schraal <mschraal gnome org>
Date:   Wed Nov 27 10:57:13 2019 +0100

    corealbum: Add thumbnail prop

 gnomemusic/corealbum.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/gnomemusic/corealbum.py b/gnomemusic/corealbum.py
index 9084cd82..ead41126 100644
--- a/gnomemusic/corealbum.py
+++ b/gnomemusic/corealbum.py
@@ -52,6 +52,8 @@ class CoreAlbum(GObject.GObject):
         self._coremodel = coremodel
         self._model = None
         self._selected = False
+        self._thumbnail = None
+
         self.update(media)
 
     def update(self, media):
@@ -111,3 +113,14 @@ class CoreAlbum(GObject.GObject):
         # is requested, it will trigger the filled model update as
         # well.
         self.props.model.items_changed(0, 0, 0)
+
+    @GObject.Property(type=str, default=None)
+    def thumbnail(self):
+        if self._thumbnail == None:
+            self._thumbnail = "loading"
+
+        return self._thumbnail
+
+    @thumbnail.setter
+    def thumbnail(self, value):
+        self._thumbnail = value


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