Skip to content

Commit

Permalink
[upnpcontrol] Fix IllegalArgumentException when downloading album a…
Browse files Browse the repository at this point in the history
…rt (#17965)

* Stip whitespace from album art URI

Signed-off-by: Dan Cunningham <[email protected]>
  • Loading branch information
digitaldan authored Dec 24, 2024
1 parent 7c6e658 commit 0e5e48f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1648,12 +1648,12 @@ private void updateMetaDataState(UpnpEntry media) {
}
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);
}
Expand Down

0 comments on commit 0e5e48f

Please sign in to comment.