diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 98584b2..fe627fc 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -2,6 +2,7 @@ name: Build on: - push + - pull_request env: publish-python-version: 3.12 diff --git a/async_upnp_client/profiles/dlna.py b/async_upnp_client/profiles/dlna.py index 9bf0343..2291a06 100644 --- a/async_upnp_client/profiles/dlna.py +++ b/async_upnp_client/profiles/dlna.py @@ -1208,8 +1208,8 @@ def media_image_url(self) -> Optional[str]: for res in item.resources: protocol_info = res.protocol_info or "" - if protocol_info.startswith("http-get:*:image/"): - return absolute_url(device_url, res.url) + if protocol_info.startswith("http-get:*:image/") and res.uri: + return absolute_url(device_url, res.uri) return None diff --git a/changes/244.bugfix b/changes/244.bugfix new file mode 100644 index 0000000..120a82d --- /dev/null +++ b/changes/244.bugfix @@ -0,0 +1 @@ +Fix media_image_url using Resource.url instead of .uri (@chishm)