Attempt to fix issue #2122
This commit is contained in:
parent
8d726c2c8d
commit
01915f91cf
|
@ -893,7 +893,7 @@ class SubsonicViewSet(viewsets.GenericViewSet):
|
||||||
.select_related("attachment_cover")
|
.select_related("attachment_cover")
|
||||||
.get(pk=artist_id)
|
.get(pk=artist_id)
|
||||||
)
|
)
|
||||||
except (TypeError, ValueError, music_models.Album.DoesNotExist):
|
except (TypeError, ValueError, music_models.Artist.DoesNotExist):
|
||||||
return response.Response(
|
return response.Response(
|
||||||
{"error": {"code": 70, "message": "cover art not found."}}
|
{"error": {"code": 70, "message": "cover art not found."}}
|
||||||
)
|
)
|
||||||
|
@ -902,7 +902,7 @@ class SubsonicViewSet(viewsets.GenericViewSet):
|
||||||
try:
|
try:
|
||||||
attachment_id = id.replace("at-", "")
|
attachment_id = id.replace("at-", "")
|
||||||
attachment = common_models.Attachment.objects.get(uuid=attachment_id)
|
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(
|
return response.Response(
|
||||||
{"error": {"code": 70, "message": "cover art not found."}}
|
{"error": {"code": 70, "message": "cover art not found."}}
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fixed the exceptions caught in two places in the getCoverArt subsonic API (#2122)
|
Loading…
Reference in New Issue