[gnome-music] albumartcache: Check if tags is None



commit 4bd1aaf76fc4b14116c52d8ed6b91e226e1966b3
Author: Marinus Schraal <mschraal src gnome org>
Date:   Mon Apr 10 23:47:41 2017 +0200

    albumartcache: Check if tags is None
    
    Workaround for the issue where get_tags returns None. According to the
    API this shouldn't happen, but reports indicate otherwise resulting in
    crashes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780980

 gnomemusic/albumartcache.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/albumartcache.py b/gnomemusic/albumartcache.py
index f891336..4b44d10 100644
--- a/gnomemusic/albumartcache.py
+++ b/gnomemusic/albumartcache.py
@@ -320,7 +320,12 @@ class AlbumArtCache(GObject.GObject):
 
             self.lookup(item, art_size, callback, itr)
 
-        if error is not None:
+        # FIXME: tags should not return as None, but it sometimes is.
+        # So as a workaround until we figure out what is wrong check
+        # for it.
+        # https://bugzilla.gnome.org/show_bug.cgi?id=780980
+        if (error is not None
+                or tags is None):
             art_retrieved(False)
             return
 


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