Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check that album art uri is a valid string #215

Merged
merged 4 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion async_upnp_client/profiles/dlna.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
for item in items:
# Some players use Item.albumArtURI,
# though not found in the UPnP-av-ConnectionManager-v1-Service spec.
if hasattr(item, "album_art_uri"):
if hasattr(item, "album_art_uri") and item.album_art_uri is not None:

Check warning on line 1198 in async_upnp_client/profiles/dlna.py

View check run for this annotation

Codecov / codecov/patch

async_upnp_client/profiles/dlna.py#L1198

Added line #L1198 was not covered by tests
return absolute_url(device_url, item.album_art_uri)

for res in item.resources:
Expand Down
1 change: 1 addition & 0 deletions changes/215.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent error when album_art_uri is `None` (@darrynlowe)