Relax dlna_dmr filtering when browsing media#69576
Merged
balloob merged 4 commits intohome-assistant:devfrom May 5, 2022
Merged
Relax dlna_dmr filtering when browsing media#69576balloob merged 4 commits intohome-assistant:devfrom
balloob merged 4 commits intohome-assistant:devfrom
Conversation
Some devices do not report all that they support, and in this case filtering will hide media that's actually playable. Most devices are OK, though, and it's better to hide what they can't play. Add an option, off by default, to show all media.
|
Hey there @StevenLooman, mind taking a look at this pull request as it has been labeled with an integration ( |
8 tasks
Contributor
Author
|
@StevenLooman, thank you for reviewing the associated documentation PR. Could you please also review this code?
The github stale bot has already closed the issue this addresses for inactivity, but this is still relevant.
|
StevenLooman
approved these changes
May 4, 2022
Contributor
StevenLooman
left a comment
There was a problem hiding this comment.
LGTM. I was surprised to see hass_ws_client in the tests at first, but this seems to be the way to test it.
Contributor
Author
|
Thank you for the review.
I was surprised to see hass_ws_client in the tests at first, but this seems to be the way to test it.
Yeah, I copied the test from `cast`, as that was where the media source feature was originally developed.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
When browsing media in the dlna_dmr integration, loosen the filtering criteria slightly by only matching on MIME type, not including any extra parameters. E.g. only match against
audio/mpeginaudio/mpeg;codecs=mp3, ignoring the part after the semicolon.For when this isn't enough (when the DMR device doesn't correctly report all media types it supports) also add an integration option to disable filtering altogether.
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: