JSON-RPC: cleanup methods in Player namespace #1507

Merged
merged 5 commits into from Oct 4, 2012

Conversation

Projects
None yet
1 participant
@Montellese
Member

Montellese commented Sep 30, 2012

These commits contain some cleanup in the Player namespace. The following changes are included:

  • merge Player.Move(Left|Right|Up|Down) into Player.Move which takes a "direction" parameter which can be "left", "right", "up" or "down"
  • merge Player.Zoom(In|Out) into Player.Zoom which takes a "zoom" parameter which can be "in", "out" or any integer between 1 and 10 (zoom level)
  • merge Player.(Un)Shuffle into Player.SetShuffle with a "shuffle" parameter which can be true, false or "toggle" so this adds the toggle functionality which wasn't possible up until now
  • rename Player.Repeat to Player.SetRepeat to match the naming convention and renames the "state" parameter to "repeat" and add "cycle" to the list of possible values for the "repeat" parameter
  • merge Player.Go(Previous|Next|To) into Player.GoTo with a "to" parameter (not "position") which can be "previous", "next" or any integer number describing a position in the playlist

Obviously these changes break backwards compatibility (which has already happend a while ago for Frodo anyway) but IMO provides a cleaner interface. I made every change in a single commit so it would be easy to drop one of the changes if deemed unnecessary/unfit.

@Montellese

This comment has been minimized.

Show comment Hide comment
@Montellese

Montellese Sep 30, 2012

Member

On mizaki's request I have added a "cycle" value to the possible values of the "repeat" parameter in Player.SetRepeat which will cycle through the "off", "one" and "all" states without the client having to know the current state.

Member

Montellese commented Sep 30, 2012

On mizaki's request I have added a "cycle" value to the possible values of the "repeat" parameter in Player.SetRepeat which will cycle through the "off", "one" and "all" states without the client having to know the current state.

@ghost ghost assigned Montellese Sep 30, 2012

Montellese added a commit that referenced this pull request Oct 4, 2012

Merge pull request #1507 from Montellese/jsonrpc_player_cleanup
jsonrpc: cleanup methods in Player namespace

@Montellese Montellese merged commit 552580d into xbmc:master Oct 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment