GNOME Bugzilla – Bug 761502
playlist filter not working, allowing non MUSIC_DIR playlists
Last modified: 2016-05-10 21:29:08 UTC
Created attachment 320337 [details] [review] make playlist query filter MUSIC_DIR only I noticed the playlist view showed playlists that were not in the MUSIC_DIR. Attached patch remedies that problem. The former FILTER statement didn't work b/c it was inside the optional bracket. Taking it outside however has the side effect of not showing the internal playlists, because those have no nie:url and are not tracker:available. I finally figured that nfo:belongsToContainer is not bound for the internal playlist and we could check for that. It's a somewhat convoluted way, but it works.
Created attachment 320429 [details] [review] special playlists on top this addition to the query orders the internal gnome-music playlists (most played, etc.) on top. I thought it was a bit odd they were just somewhere in the middle of the pack.
Comment on attachment 320337 [details] [review] make playlist query filter MUSIC_DIR only Looks fine to me as a workaround, but I think this is a bug in Tracker. Filters within optionals are meant to work, see: http://www.w3.org/TR/sparql11-query/#OptionalAndConstraints I'll leave it up to Felipe whether he wants to push this or not. Would be great to fix in Tracker anyway.
Comment on attachment 320429 [details] [review] special playlists on top This one looks fine to me. Although notice that the commit also caught some change in libgd, could make sense to remove that from the patch before pushing.
Comment on attachment 320337 [details] [review] make playlist query filter MUSIC_DIR only Turns out I was misreading the spec... This patch looks good to me.
Created attachment 327613 [details] [review] query: Include playlists from Music dir only Tracker queries erronously included playlist from outside the Music directory. Fix the query to only include playlists from the Music directory.
Created attachment 327614 [details] [review] query: Order special playlist on top Use the fact that the auto-generated playlists are tagged to sort them on top of the list.
Created attachment 327615 [details] [review] query: Include playlists from Music dir only Tracker queries erroneously included playlist from outside the Music directory. Fix the query to only include playlists from the Music directory.