Cast: Fix next/previous track#22634
Merged
Merged
Conversation
emontnemery
commented
Apr 1, 2019
| """Send previous track command.""" | ||
| media_controller = self._media_controller() | ||
| media_controller.rewind() | ||
| media_controller.queue_next() |
Contributor
Author
There was a problem hiding this comment.
We could consider seeking to beginning of track if more than a few seconds has been played.
But maybe that's something that should be handled in the frontend instead of by each integration?
Member
There was a problem hiding this comment.
I think that it's something that should be handled by each integration, preferably we even just forward the command and let the service/device itself figure it out.
emontnemery
commented
Apr 1, 2019
| if media_status.supports_queue_next: | ||
| support |= SUPPORT_NEXT_TRACK | ||
| if media_status.supports_seek: | ||
| support |= SUPPORT_SEEK |
Contributor
Author
There was a problem hiding this comment.
Setting this doesn't seem to make any difference to the frontend, is it not implemented?
b032126 to
cce3746
Compare
balloob
approved these changes
Apr 3, 2019
jonbeckman
pushed a commit
to jonbeckman/home-assistant
that referenced
this pull request
Apr 7, 2019
* Fix next/previous track * Bump pychromecast * Update test, fixup
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.
Description:
Use
queue_next/queue_previnstead of seeking to end/beginning of trackAlso only show next / previous UI controls if the currently playing playlist allows it.
Note: Depends on home-assistant-libs/pychromecast#286
Checklist:
tox. Your PR cannot be merged unless tests pass