[gnome-music] albumArt: remove path queue, this is superseded by threads queue



commit 3e289461550ad330ced162c08a6b1388009e3022
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Fri Oct 3 14:34:18 2014 +0200

    albumArt: remove path queue, this is superseded by threads queue

 gnomemusic/albumArtCache.py |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index f2366b8..8b982b4 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -82,7 +82,6 @@ def _make_icon_frame(pixbuf, path=None):
 class AlbumArtCache:
     instance = None
     blacklist = {}
-    queue = []
 
     @classmethod
     def get_default(self):
@@ -188,9 +187,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)
@@ -207,8 +203,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)
@@ -218,8 +212,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
@@ -258,8 +250,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)


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