[gnome-music/wip/jfelder/trackerwrapper-cleanup: 3/3] grltrackerwrapper: Cleanup _song_media_query




commit 95732b2c5b703d58fed8af53f0c2755481103c34
Author: Jean Felder <jfelder src gnome org>
Date:   Thu Jun 23 12:43:54 2022 +0200

    grltrackerwrapper: Cleanup _song_media_query

 gnomemusic/grilowrappers/grltrackerwrapper.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index d7c300744..2831b9774 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -414,9 +414,8 @@ class GrlTrackerWrapper(GObject.GObject):
 
         :param list ids: List of Media ids to filter by or None
         """
-        if ids is None:
-            songs_filter = ""
-        else:
+        songs_filter = ""
+        if ids is not None:
             media_ids = ", ".join([f"<{media_id}>" for media_id in ids])
             songs_filter = f"FILTER ( ?song in ( {media_ids} ) )"
 


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