[gnome-music/wip/mschraal/coresong-thumbnail-prop: 163/179] corealbum: Add thumbnail prop
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/coresong-thumbnail-prop: 163/179] corealbum: Add thumbnail prop
- Date: Wed, 26 Feb 2020 23:33:56 +0000 (UTC)
commit d9a3f2d1e51cad51b8f459a9e80a221de75af1b2
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]