[gnome-music] view: Remove check for duplicate jobs



commit 7c65baf08d1dd75773a77189c5555c207b830b55
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Dec 27 13:05:47 2015 +0100

    view: Remove check for duplicate jobs
    
    This incurs into O(n²) behavior. Let's instead rely on the query
    returning unique results.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760033

 gnomemusic/view.py |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 2c6d0db..f62ca8e 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -212,13 +212,6 @@ class ViewContainer(Gtk.Stack):
                 self.window.notification.dismiss()
                 self.view.show()
             return
-        # Make sure the item with this ID is not added
-        _iter = self.model.get_iter_first()
-        while _iter:
-            item_id = self.model.get_value(_iter, 0)
-            if str(item_id) == item.get_id():
-                return
-            _iter = self.model.iter_next(_iter)
 
         self._offset += 1
         artist = item.get_string(Grl.METADATA_KEY_ARTIST)\


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