[upnpcontrol] Catch IAE when Album Art URI is invalid (#16597)

Fixes #16595

Signed-off-by: Wouter Born <github@maindrain.net>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Wouter Born 2024-04-01 09:43:05 +02:00 committed by Ciprian Pascu
parent ef2d5ab921
commit 7deea3a8e2

View File

@ -1651,7 +1651,12 @@ public class UpnpRendererHandler extends UpnpHandler {
if (media.getAlbumArtUri().isEmpty() || media.getAlbumArtUri().contains("DefaultAlbumCover")) {
updateState(ALBUM_ART, UnDefType.UNDEF);
} else {
State albumArt = HttpUtil.downloadImage(media.getAlbumArtUri());
State albumArt = null;
try {
albumArt = HttpUtil.downloadImage(media.getAlbumArtUri());
} catch (IllegalArgumentException e) {
logger.debug("Invalid album art URI: {}", media.getAlbumArtUri(), e);
}
if (albumArt == null) {
logger.debug("Failed to download the content of album art from URL {}", media.getAlbumArtUri());
if (!isCurrent) {