Subsonic API: added artist images in getCoverArt endpoint, fixes #392

This commit is contained in:
emeric
2023-12-15 21:14:02 +01:00
parent 5257f687b4
commit bb4facf8e6
11 changed files with 211 additions and 34 deletions
@@ -269,13 +269,9 @@ namespace API::Subsonic
else if (releaseId)
cover = Service<Cover::ICoverService>::get()->getFromRelease(*releaseId, size);
else if (artistId)
{
// TODO handle a placeholder for artists
response.setStatus(404);
return;
}
cover = Service<Cover::ICoverService>::get()->getFromArtist(*artistId, size);
if (!cover && context.enableDefaultCover)
if (!cover && context.enableDefaultCover && !artistId)
cover = Service<Cover::ICoverService>::get()->getDefault(size);
if (!cover)