Skip to content

Commit

Permalink
Fix media_image_url using Resource.url instead of .uri (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
chishm authored Sep 10, 2024
1 parent b0a941a commit 7d61b37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build

on:
- push
- pull_request

env:
publish-python-version: 3.12
Expand Down
4 changes: 2 additions & 2 deletions async_upnp_client/profiles/dlna.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions changes/244.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix media_image_url using Resource.url instead of .uri (@chishm)

0 comments on commit 7d61b37

Please sign in to comment.