From cfcf93ee7055a6b6afc17557e746eadcc111adb5 Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Mon, 23 Dec 2024 11:46:24 -0800 Subject: [PATCH 1/2] Stip whitespace from album art URI Signed-off-by: Dan Cunningham --- .../upnpcontrol/internal/handler/UpnpRendererHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java b/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java index 0ff5a145a343c..0460b2a8068a5 100644 --- a/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java +++ b/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java @@ -1653,7 +1653,7 @@ private void updateMetaDataState(UpnpEntry media) { } 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); } From a262d36550473067d152a931ace6420648ac7c36 Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Tue, 24 Dec 2024 08:54:27 -0800 Subject: [PATCH 2/2] PR Review changes Signed-off-by: Dan Cunningham --- .../upnpcontrol/internal/handler/UpnpRendererHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java b/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java index 0460b2a8068a5..6f0165ddb10a8 100644 --- a/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java +++ b/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java @@ -1648,7 +1648,7 @@ 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;