[gnome-music/wip/jfelder/grilo-theaudiodb: 3/3] query: Make coverart queries more lenient
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/grilo-theaudiodb: 3/3] query: Make coverart queries more lenient
- Date: Mon, 3 Sep 2018 08:48:02 +0000 (UTC)
commit d765395050f393e90f1658d05414b0c5f6b90399
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Sep 2 23:55:24 2018 +0200
query: Make coverart queries more lenient
Coverart Tracker queries were strictly using nmm:albumArtist, but in
reality tags often do not provide this information.
Allow regular nmm:performer tags as fallback for the artist info.
gnomemusic/query.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/query.py b/gnomemusic/query.py
index 217a976f..b8223bc8 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -338,7 +338,8 @@ class Query():
SELECT DISTINCT
rdf:type(?album)
tracker:id(?album) AS ?id
- nmm:artistName(?album_artist) AS ?artist
+ tracker:coalesce(nmm:artistName(?album_artist),
+ nmm:artistName(?song_artist)) AS ?artist
nie:title(?album) AS ?album
WHERE {
?album a nmm:MusicAlbum .
@@ -363,7 +364,8 @@ class Query():
SELECT DISTINCT
rdf:type(?album)
tracker:id(?album) AS ?id
- nmm:artistName(?album_artist) AS ?artist
+ tracker:coalesce(nmm:artistName(?album_artist),
+ nmm:artistName(?song_artist)) AS ?artist
nie:title(?album) AS ?album
WHERE {
?song a nmm:MusicPiece ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]