-
Notifications
You must be signed in to change notification settings - Fork 457
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
✨ Add change song command to API #1355
Conversation
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.
Just requesting that the command name be changed and it should be good.
Also please make sure to add the error code to the errorCodes
array that was above otherwise the API will not properly return it https://github.com/ytmdesktop/ytmdesktop/pull/1355/files#diff-84b5d03309d58f0086ac6d2cb4cdce5f610a13d9f697edfb31974dd3a8c2c9b2R4-R17
Done, with the slight exception of changing |
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.
LGTM
Squashed the changes into a single commit to make it ready to merge. |
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.
Shocked as to how simple this is, but looks and feels effective :)
Interesting to see how people would integrate with this.
This just adds a command to the API to change the current song/playlist, using logic copied from the existing implementation for the URI handler. There's still useful functionality that won't be covered, such as adding a song to the queue without replacing the queue entirely, but this at least covers a major use case.
There's no validation to ensure the video and playlist id are correct, which can cause some weirdness; invalid playlist ids will cause the bottom bar to disappear, for example.