GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 71f58eb3 authored by Marinus Schraal's avatar Marinus Schraal

query: Fix coverart retrieval

With the introduction of album_artist in commit 17de0840 I went a bit
too far, since the Grilo cover art plugins only use artist for
retrieval. Have those queries return an artist key instead.
parent ef41a7e2
......@@ -342,6 +342,9 @@ class Query():
@staticmethod
def get_album_for_album_id(album_id):
# Even though we check for the album_artist, we fill
# the artist key, since Grilo coverart plugins use
# only that key for retrieval.
query = """
SELECT DISTINCT
rdf:type(?album)
......@@ -353,7 +356,7 @@ class Query():
?album nmm:albumArtist ?album_artist
}
LIMIT 1
) AS ?album_artist
) AS ?artist
nie:title(?album) AS ?title
nie:title(?album) AS ?album
WHERE {
......@@ -370,6 +373,7 @@ class Query():
@staticmethod
def get_album_for_song_id(song_id):
# See get_album_for_album_id comment.
query = """
SELECT DISTINCT
rdf:type(?album)
......@@ -381,7 +385,7 @@ class Query():
?album nmm:albumArtist ?album_artist
}
LIMIT 1
) AS ?album_artist
) AS ?artist
nie:title(?album) AS ?title
nie:title(?album) AS ?album
WHERE {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment