mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[upnpcontrol] Fix IllegalArgumentException
when downloading album art (#17965)
* Stip whitespace from album art URI Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This commit is contained in:
parent
7c6e658f56
commit
0e5e48f763
@ -1648,12 +1648,12 @@ public class UpnpRendererHandler extends UpnpHandler {
|
||||
}
|
||||
if (!(isCurrent
|
||||
&& (media.getAlbumArtUri().isEmpty() || media.getAlbumArtUri().contains("DefaultAlbumCover")))) {
|
||||
if (media.getAlbumArtUri().isEmpty() || media.getAlbumArtUri().contains("DefaultAlbumCover")) {
|
||||
if (media.getAlbumArtUri().isBlank() || media.getAlbumArtUri().contains("DefaultAlbumCover")) {
|
||||
updateState(ALBUM_ART, UnDefType.UNDEF);
|
||||
} else {
|
||||
State albumArt = null;
|
||||
try {
|
||||
albumArt = HttpUtil.downloadImage(media.getAlbumArtUri());
|
||||
albumArt = HttpUtil.downloadImage(media.getAlbumArtUri().trim());
|
||||
} catch (IllegalArgumentException e) {
|
||||
logger.debug("Invalid album art URI: {}", media.getAlbumArtUri(), e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user