[gnome-music/wip/mschraal/grltrackerplaylist-empty-playlist-delete-3-34] grltrackerplaylists: Fix empty playlist deletion



commit 4c2ea621b5bc9543a41b26286cfc3cc766706ccc
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Feb 9 16:05:12 2020 +0100

    grltrackerplaylists: Fix empty playlist deletion
    
    The query requiered a nfo:MediaFileListEntry, which does not exist in
    empty playlists.
    
    Remove the nfo:MediaFileListEntry requirement.
    
    Closes: #365

 gnomemusic/grilowrappers/grltrackerplaylists.py | 5 -----
 1 file changed, 5 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index dd32baef..ec5072bd 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -201,15 +201,10 @@ class GrlTrackerPlaylists(GObject.GObject):
         query = """
         DELETE {
             ?playlist a rdfs:Resource .
-            ?entry a rdfs:Resource .
-
         }
         WHERE {
             ?playlist a nmm:Playlist ;
                       a nfo:MediaList .
-            OPTIONAL {
-                ?playlist nfo:hasMediaFileListEntry ?entry .
-            }
             FILTER (
             tracker:id(?playlist) = %(playlist_id)s
             )


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