Add media browser to Yoto#172325
Merged
Merged
Conversation
Contributor
|
Hey there @cdnninja, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds media browser support and yoto:// URI-driven targeted playback for the Yoto media player integration.
Changes:
- Implement
async_browse_mediato expose the user’s Yoto card library (cards → chapters → tracks) with compact navigation rules. - Implement
async_play_mediato resolveyoto://card[/chapter[/track]]URIs intoplay_cardcalls. - Extend test coverage and snapshots to validate browse/play behavior and updated supported features.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| homeassistant/components/yoto/media_player.py | Adds browse/play media support and yoto:// URI parsing/building. |
| homeassistant/components/yoto/strings.json | Adds new translated exception messages for browse/play validation and failures. |
| tests/components/yoto/conftest.py | Expands mock card data to include chapters/tracks for browse/play tests. |
| tests/components/yoto/test_media_player.py | Adds tests for play_media routing, validation, and browse tree behavior. |
| tests/components/yoto/snapshots/test_media_player.ambr | Updates snapshots for new supported feature flags. |
8 tasks
c8515c0 to
193bb57
Compare
Comment on lines
+28
to
+30
| # First path segment names the content type. Only cards exist today; | ||
| # reserving it leaves room for groups without breaking URIs. | ||
| URI_CARD = "card" |
joostlek
requested changes
Jun 1, 2026
Contributor
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
74a236e to
43bf95d
Compare
joostlek
approved these changes
Jun 1, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Needs #172753
Adds library browsing and targeted playback to the Yoto media player.
Users can open the media browser from a Yoto entity and navigate their card library. Cards expand into chapters, chapters into tracks, and any node can be played directly. The browser uses a
yoto://card/<card_id>/<chapter_key>/<track_key>URI scheme, andplay_mediaresolves the URI to the rightplay_cardcall. Thecardsegment namespaces the identifier so groups can be added later without breaking existing URIs.Two small UX choices keep the tree compact:
Playing a chapter starts from its first track. Targeted plays (chapter or track) always start from the beginning, while a bare card play preserves the card's own resume setting.
Library view

Card view

Type of change
Additional information
Checklist
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`.
Updated by running `python3 -m script.gen_requirements_all`.
To help with the load of incoming pull requests: