Attempt to fix issue #2122

This commit is contained in:
Karl Sickendick 2025-02-16 23:37:45 +00:00 committed by petitminion
parent 8d726c2c8d
commit 01915f91cf
2 changed files with 3 additions and 2 deletions

View File

@ -893,7 +893,7 @@ class SubsonicViewSet(viewsets.GenericViewSet):
.select_related("attachment_cover")
.get(pk=artist_id)
)
except (TypeError, ValueError, music_models.Album.DoesNotExist):
except (TypeError, ValueError, music_models.Artist.DoesNotExist):
return response.Response(
{"error": {"code": 70, "message": "cover art not found."}}
)
@ -902,7 +902,7 @@ class SubsonicViewSet(viewsets.GenericViewSet):
try:
attachment_id = id.replace("at-", "")
attachment = common_models.Attachment.objects.get(uuid=attachment_id)
except (TypeError, ValueError, music_models.Album.DoesNotExist):
except (TypeError, ValueError, common_models.Attachment.DoesNotExist):
return response.Response(
{"error": {"code": 70, "message": "cover art not found."}}
)

View File

@ -0,0 +1 @@
Fixed the exceptions caught in two places in the getCoverArt subsonic API (#2122)