-
Notifications
You must be signed in to change notification settings - Fork 686
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
Fix/1133 Add nextsong and nextsongid to mpd status command #1523
Conversation
https://www.musicpd.org/doc/protocol/command_reference.html#status_commands for my own reference. |
@@ -185,6 +186,9 @@ def status(context): | |||
'playback.state': context.core.playback.get_state(), | |||
'playback.current_tl_track': tl_track, | |||
'tracklist.index': context.core.tracklist.index(tl_track.get()), | |||
'tracklist.next_tlid': next_tlid, | |||
'tracklist.next_index': context.core.tracklist.index( | |||
tlid=next_tlid.get()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we shouldn't have this .get()
inside here. But given the APIs that are currently available this is the correct way to do it as far as I can see.
A quick changelog entry for this would be awesome, rest looks good to me. |
I'm not at home for a while. When I come back next week I'll add the note in the changelog. |
Perfect, thanks for the contribution and following up on this. I looked into the now failing travis test, looks unrelated to your change so just double checking that before merging :-) |
I rebuilt https://travis-ci.org/mopidy/mopidy/builds/137349654 which was known good and it now fails... So going ahead and merging your change and we'll have to unbreak the build for everyone using a newer flake8. |
The PR adds nextsong and nextsongid to mpd status command.
The ID of the next track to be played is provided by
tracklist.get_next_tlid()
It also fixes #1516 (duplicated)