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

YouTube Music: Filter videos from search results and radio #1721

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ov1d1u
Copy link

@ov1d1u ov1d1u commented Oct 17, 2024

This small PR removes videos from search results and radio playlists. I made this change mostly for myself, as I'm annoyed to hear all non-music related noises when I'm listening to music from YouTube Music.

Because the results are being filtered after YouTube returned them, I think this may lead to situations when you start a radio and you get nothing (because everything was filtered out), but I never ran in such an issue.

Ideally this would be an option in the YouTube Music provider, but I don't know Music Assistant's codebase so well yet to implement this.

@MarvinSchenkel
Copy link
Contributor

Just out of curiosity, can you link a few videos that would be excluded with this extra filter? I once had a '12 hours calm waves' video included in the radio, but we are currently already restricting radio items to have a max length of 20mins.

Preferably this would be a boolean configuration item 'Exclude videos from search & radio' (default False) in the provider. You can have a look here at an example. If you need some more pointers or help, let me know.

@ov1d1u
Copy link
Author

ov1d1u commented Oct 18, 2024

An example would be https://www.youtube.com/watch?v=8WYHDfJDPDc, which is a music video with some non-music segment at the beginning and the end. These are the results without this change, with the first result being this video:
Screenshot 2024-10-18 at 09 42 28

And these are the results after this change, the video filtered out:
Screenshot 2024-10-18 at 09 42 33

Thanks for pointing out that code, I will look into it and try to make this a configuration option.

@marcelveldt
Copy link
Member

Maybe better to point at a provider-level ConfigEntry, for examples see any of the existing providers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants