[gnome-music/wip/mschraal/coresong-thumbnail-prop: 175/179] mediaart: Add default loading icon



commit 47843b16cd515f187d895861dd499fd873895c7e
Author: Marinus Schraal <mschraal gnome org>
Date:   Tue Dec 24 16:54:41 2019 +0100

    mediaart: Add default loading icon

 gnomemusic/mediaart.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gnomemusic/mediaart.py b/gnomemusic/mediaart.py
index 3b8c1818..b9b0000e 100644
--- a/gnomemusic/mediaart.py
+++ b/gnomemusic/mediaart.py
@@ -127,6 +127,8 @@ class MediaArt(GObject.GObject):
 
         self._default_icon = DefaultIcon().get(
             DefaultIcon.Type.MUSIC, self._size, self._scale)
+        self._loading_icon = DefaultIcon().get(
+            DefaultIcon.Type.LOADING, self._size, self._scale)
 
         cache_dir = GLib.build_filenamev(
             [GLib.get_user_cache_dir(), "media-art"])
@@ -156,6 +158,9 @@ class MediaArt(GObject.GObject):
         if thumbnail_uri == "generic":
             self.emit("result", self._default_icon)
             return
+        elif thumbnail_uri == "loading":
+            self.emit("result", self._loading_icon)
+            return
         elif thumbnail_uri is None:
             return
 


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