Minor fixes for Plex media browser#39878
Conversation
1934631 to
33417c1
Compare
|
The uncovered lines are for failsafes mostly added in other PRs to prevent unexpected media types from passing through. The types provided by Plex are very consistent so I'm not worried about this. Maybe it's safe enough to remove those checks instead of writing tests for events that will never occur... |
| f"Media not found: {media_content_type} / {media_content_id}" | ||
| ) from err | ||
| _LOGGER.debug("Unknown type received: %s", library_or_section.TYPE) | ||
| raise UnknownMediaType from err |
There was a problem hiding this comment.
This should still raise BrowseError as that's what we're catch when calling this function.
There was a problem hiding this comment.
Good call, ran through this too quickly. Luckily we should never receive this error unless Plex changes their API payloads.
There was a problem hiding this comment.
If it's an impossible case we can remove it.
There was a problem hiding this comment.
I'll dig a bit more first and open a separate PR if it makes sense.
|
Well, now that most of the changes have been reverted I'm wondering if this did anything helpful in the first place. I believe it may have been based on a misunderstanding on my part while the frontend was still being built. In practice the folder icons all appear to display correctly now in my testing. |
|
Update the PR title and description and we can merge. |
Proposed change
Fix logging message and a trivial cleanup.
Type of change
Additional information
Checklist
black --fast homeassistant tests)The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: