mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[upnpcontrol] Catch IAE when Album Art URI is invalid (#16597)
Fixes #16595 Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
ed5bb7d895
commit
a9c0f9e936
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user