I also tried tracker3 sparql --dbus-service="org.freedesktop.Tracker3.Miner.Files" -q "SELECT ?playlist { GRAPH tracker:Audio { ?playlist a nmm:Playlist } } "
because I suspect (but could be very wrong) that GRAPH tracker:Audio will make it query the graph specific to Gnome Music, which perhaps is where the playlists are stored, but that also returns no results.
Hi Jon. The secret is that apps have their own databases. So you need to find where your GNOME Music app is storing its data, and pass that location to tracker3 --database=.
For example I have gnome music installed via flatpak, so its data is hidden in ~/.var. With this command I can see everything it has stored:
If you have gnome-music installed via your package manager then the corresponding path is probably ~/.cache/gnome-music/db.
In the old days of Tracker 2, there was a single “Tracker database” which stored everything. But since Tracker 3, apps can easily create their own database. The filesystem index created by Tracker Miner FS is one example, and the GNOME Music database is another. I wrote about this a while back here - Tracker 3.0: What’s New? – Sam Thursfield
If you’re using GNOME Music from Flatpak, it could be that the version of libtracker-sparql inside the Flatpak sandbox is newer than the version of libtracker-sparql on your host OS. Make sure your host OS is at the latest version.
That line in meson.build is showing you the minimum version required. That doesn’t tell you which version is actually in use.
If we look at the Flatpak manifest for org.gnome.Music you can see it declares a dependency on GNOME 45 runtime. Now let’s look in gnome-build-meta at the 45.0 tag. The sdk/tracker element is building Tracker 3.6.0.
The actual Tracker SPARQL database versions are defined here in tracker-db-manager.h. Seems the version bump happened in 3.6.0 so that we could improve the ranking algorithm for full-text search results.
So you can either update your host OS to something with GNOME 45 and Tracker 3.6.0, or try one of these workarounds:
run tracker3inside the Flatpak sandbox, e.g. flatpak run --command=/bin/bash org.gnome.Music
build libtracker-sparql from source and install it into ~/.local; there are some instructions in the README