Skip to content

Relax dlna_dmr filtering when browsing media#69576

Merged
balloob merged 4 commits intohome-assistant:devfrom
chishm:dlna_dmr-relax_filtering
May 5, 2022
Merged

Relax dlna_dmr filtering when browsing media#69576
balloob merged 4 commits intohome-assistant:devfrom
chishm:dlna_dmr-relax_filtering

Conversation

@chishm
Copy link
Copy Markdown
Contributor

@chishm chishm commented Apr 7, 2022

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/mpeg in audio/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

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

chishm added 3 commits April 7, 2022 22:10
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.
@probot-home-assistant
Copy link
Copy Markdown

Hey there @StevenLooman, mind taking a look at this pull request as it has been labeled with an integration (dlna_dmr) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@MartinHjelmare MartinHjelmare changed the title dlna_dmr: relax filtering when browsing media Relax dlna_dmr filtering when browsing media Apr 7, 2022
@chishm
Copy link
Copy Markdown
Contributor Author

chishm commented May 2, 2022 via email

Copy link
Copy Markdown
Contributor

@StevenLooman StevenLooman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I was surprised to see hass_ws_client in the tests at first, but this seems to be the way to test it.

@chishm
Copy link
Copy Markdown
Contributor Author

chishm commented May 4, 2022 via email

@balloob balloob merged commit eebf3ac into home-assistant:dev May 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2022
@chishm chishm deleted the dlna_dmr-relax_filtering branch July 1, 2022 12:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DLNA Renderer Integration filters out MKV files but TV is compatible with them dlna server cannot play flac and dsf audio files

4 participants