[gnome-music/wip/mschraal/coresong-thumbnail-prop: 19/35] 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: 19/35] corealbum: Add thumbnail prop
- Date: Sun, 5 Jan 2020 16:14:55 +0000 (UTC)
commit 6a46fd7d4cc00444aef8db1ac03ef0f710443533
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 9d081d63..24517658 100644
--- a/gnomemusic/corealbum.py
+++ b/gnomemusic/corealbum.py
@@ -55,6 +55,8 @@ class CoreAlbum(GObject.GObject):
self._coremodel = coremodel
self._model = None
self._selected = False
+ self._thumbnail = None
+
self.update(media)
def update(self, media):
@@ -114,3 +116,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]