Hello community,

here is the log from the commit of package gnome-music for openSUSE:Factory 
checked in at 2014-10-06 12:06:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-music (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-music.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-music"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-music/gnome-music.changes  2014-09-30 
19:39:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.gnome-music.new/gnome-music.changes     
2014-10-06 12:06:16.000000000 +0200
@@ -1,0 +2,6 @@
+Sun Oct  5 19:00:44 UTC 2014 - [email protected]
+
+- Add gnome-music-fix-missing-albumcovers.patch: Fix missing
+  albumart with libmediaart 0.6 and newer (bgo#737571).
+
+-------------------------------------------------------------------

New:
----
  gnome-music-fix-missing-albumcovers.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-music.spec ++++++
--- /var/tmp/diff_new_pack.d4psb3/_old  2014-10-06 12:06:17.000000000 +0200
+++ /var/tmp/diff_new_pack.d4psb3/_new  2014-10-06 12:06:17.000000000 +0200
@@ -24,6 +24,8 @@
 Group:          Productivity/Multimedia/Sound/Players
 Url:            http://www.gnome.org
 Source:         
http://download.gnome.org/sources/gnome-music/3.14/%{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM gnome-music-fix-missing-albumcovers.patch bgo#737571 
[email protected] -- Fix missing albumcovers with libmediaart 0.6 and newer.
+Patch0:         gnome-music-fix-missing-albumcovers.patch
 BuildRequires:  fdupes
 BuildRequires:  intltool >= 0.26
 BuildRequires:  itstool
@@ -52,6 +54,7 @@
 %lang_package
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure

++++++ gnome-music-fix-missing-albumcovers.patch ++++++
>From 9cfbac02364bc73e3e106edee1843c5bbf26f455 Mon Sep 17 00:00:00 2001
From: Vadim Rutkovsky <[email protected]>
Date: Fri, 3 Oct 2014 12:26:57 +0200
Subject: Lookup's start_new_thread should also be inside try-catch


diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index 64b4bf2..cf51f82 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -145,7 +145,10 @@ class AlbumArtCache:
 
     @log
     def lookup(self, item, width, height, callback, itr, artist, album):
-        start_new_thread(self.lookup_worker, (item, width, height, callback, 
itr, artist, album))
+        try:
+            start_new_thread(self.lookup_worker, (item, width, height, 
callback, itr, artist, album))
+        except Exception as e:
+            logger.warn("Error: %s" % e)
 
     @log
     def lookup_worker(self, item, width, height, callback, itr, artist, album):
-- 
cgit v0.10.1



>From d1797715dd1a69058ed37c82c918359281f3f8cc Mon Sep 17 00:00:00 2001
From: Vadim Rutkovsky <[email protected]>
Date: Fri, 3 Oct 2014 12:48:35 +0200
Subject: 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

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)
-- 
cgit v0.10.1

>From d122dd16c2db1a738f872c37127873bbf1b62f0c Mon Sep 17 00:00:00 2001
From: Vadim Rutkovsky <[email protected]>
Date: Fri, 3 Oct 2014 14:34:18 +0200
Subject: albumArt: remove path queue, this is superseded by threads queue


diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index 2f2d49b..ce9f406 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -79,7 +79,6 @@ def _make_icon_frame(pixbuf, path=None):
 class AlbumArtCache:
     instance = None
     blacklist = {}
-    queue = []
 
     @classmethod
     def get_default(self):
@@ -164,9 +163,6 @@ class AlbumArtCache:
                 if isinstance(i, str):
                     path = i
                     break
-            while path in self.queue:
-                sleep(0.5)
-            self.queue.append(path)
 
             if not os.path.exists(path):
                 GLib.idle_add(self.cached_thumb_not_found, item, width, 
height, path, callback, itr, artist, album)
@@ -183,8 +179,6 @@ class AlbumArtCache:
         try:
             if path:
                 item.set_thumbnail(GLib.filename_to_uri(path, None))
-                if path in self.queue:
-                    self.queue.remove(path)
             GLib.idle_add(callback, pixbuf, path, itr)
         except Exception as e:
             logger.warn("Error: %s" % e)
@@ -194,8 +188,6 @@ class AlbumArtCache:
         try:
             uri = item.get_thumbnail()
             if uri is None:
-                if path in self.queue:
-                    self.queue.remove(path)
                 grilo.get_album_art_for_item(item, 
self.album_art_for_item_callback,
                                              (item, width, height, path, 
callback, itr, artist, album))
                 return
@@ -233,8 +225,6 @@ class AlbumArtCache:
             src = Gio.File.new_for_uri(uri)
             dest = Gio.File.new_for_path(path)
             src.copy(dest, Gio.FileCopyFlags.OVERWRITE)
-            if path in self.queue:
-                self.queue.remove(path)
             self.lookup_worker(item, width, height, callback, itr, artist, 
album)
         except Exception as e:
             logger.warn("Error: %s" % e)
-- 
cgit v0.10.1

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to