[gnome-music/wip/mschraal/3-28-freeze-fixes] albumartcache: Do not send two signals on error



commit c04a5cc9c60bd2231e65277030704734ec742c93
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Mar 8 14:08:07 2018 +0100

    albumartcache: Do not send two signals on error
    
    In the embedded art lookup code, there was a possibility that two
    conflicting signals got sent on error.
    
    Fix it by adding a return statement after sending the correct signal.

 gnomemusic/albumartcache.py | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gnomemusic/albumartcache.py b/gnomemusic/albumartcache.py
index a00b0b67..9da1adb3 100644
--- a/gnomemusic/albumartcache.py
+++ b/gnomemusic/albumartcache.py
@@ -595,6 +595,7 @@ class EmbeddedArt(GObject.GObject):
                 # This error indicates that the coverart has already
                 # been linked by another concurrent lookup.
                 self.emit('found')
+                return
             else:
                 logger.warning("Error: {}, {}".format(
                     MediaArt.Error(error.code), error.message))


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