[gnome-music/gnome-3-14] Find path in libmediaart response by searching for path



commit d1797715dd1a69058ed37c82c918359281f3f8cc
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Fri Oct 3 12:48:35 2014 +0200

    Find path in libmediaart response by searching for path
    
    It seems that since libmeddiart 0.6 params are swapped,
     we should not rely on indexes and search for path instead
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737571

 gnomemusic/albumArtCache.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index cf51f82..2f2d49b 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -158,7 +158,12 @@ class AlbumArtCache:
                 self.finish(item, None, None, callback, itr)
                 return
 
-            path = MediaArt.get_path(artist, album, "album", None)[0]
+            path = None
+            mediaart_tuple = MediaArt.get_path(artist, album, "album", None)
+            for i in mediaart_tuple:
+                if isinstance(i, str):
+                    path = i
+                    break
             while path in self.queue:
                 sleep(0.5)
             self.queue.append(path)


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