Skip to content
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

[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options #15939

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

rmrector
Copy link
Contributor

@rmrector rmrector commented Apr 19, 2019

Description

Remove implicit duplicate options

value: 25
value: {"minutes":10,"seconds":15}
value: "bigforward"

Leaving only the explicitly parameterized options (available since Kodi 15 Isengard)

// Percentage value to seek to
value: {"percentage":25}
// Time to seek to
value: {"time": {"minutes":10,"seconds":15}}

// Seek by predefined jumps
value: {"step":"bigforward"}

// Seek by the given number of seconds
value: {"seconds":30}
// backward
value: {"seconds":-30}

Motivation and Context

This method's parameters are ambiguous with one of the duplicates. Removing it clears up the ambiguity and solves a reported issue #15914.

Removing the rest of the duplicates simplifies the schema and the code, slightly, with no loss of functionality.

How Has This Been Tested?

Manually.

Types of change

  • Breaking change any JSON-RPC consumers that use the removed options will receive an error response "Invalid params.".

Checklist

  • will need an update to the forum thread tracking JSON-RPC changes

@rmrector rmrector added API change: JSON-RPC Don't merge PR that should not be merged (yet) v19 Matrix labels Apr 19, 2019
@rmrector rmrector added this to the M** 19.0-alpha 1 milestone Apr 19, 2019
@DaveTBlake
Copy link
Member

It's really early to bump the JSON-RPC version for this little guy, but here's the code.

Yes it is, and such a bump would make any fixes that need backporting to Leia tricky, so can we hold off breaking changes if possible until v18 is frozen. As a reminder when the first breaking change happens it will be a bump to 11.0.0 (with v11 covering all breaking changes during development phase rather than run-away number), and finally to 12.0.0 on release of v19.

@rmrector
Copy link
Contributor Author

Yup, it can definitely wait some time. My thought was to wait for something more substantial to be the first breaking change.

@rmrector rmrector removed the Don't merge PR that should not be merged (yet) label Dec 8, 2019
@rmrector
Copy link
Contributor Author

rmrector commented Dec 8, 2019

With the JSON-RPC version bump its about time for this to go in.

@rmrector
Copy link
Contributor Author

Looking through the existing remote implementations, Kore, Yatse, and Chorus2 all use implicit options that are removed by this PR and will break on seeking with the seekbar.

Kore and Yatse both seek by time with "params":{"playerid:"0,value: {"hours":0,"milliseconds":0,"minutes":1,"seconds":18}} - the explicit replacement is "params":{"playerid:"0,value: {"time": {"hours":0,"milliseconds":0,"minutes":1,"seconds":18}}}.

Chorus2 seeks by percentage with "params":[0,74], the explicit replacement is "params":[0,{"percentage":74}].

@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Jan 27, 2020
@jenkins4kodi jenkins4kodi removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Mar 8, 2020
@phunkyfish
Copy link
Contributor

@rmrector how should this be progressed?

@phunkyfish phunkyfish added the PR Cleanup: Ask Author PR appears to still be relevant and mergeable. Comment to author to check on status. label Mar 9, 2020
@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Mar 9, 2020
@rmrector rmrector removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Mar 18, 2020
@rmrector
Copy link
Contributor Author

It can be merged when it's green. I spaced, I didn't mean to hold it past the new year.

@DaveTBlake DaveTBlake added the Type: Breaking change fix or feature that will cause existing functionality to change label Mar 18, 2020
@DaveTBlake DaveTBlake changed the title [jsonrpc] remove ambiguous and duplicate Player.Seek options [jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options Mar 18, 2020
@phunkyfish phunkyfish added PR Cleanup: Merge Candidate Candidate for merging after PR cleanup and removed PR Cleanup: Ask Author PR appears to still be relevant and mergeable. Comment to author to check on status. labels Mar 18, 2020
@phunkyfish
Copy link
Contributor

@DaveTBlake how are breaking changes for jsonrpc usually handled?

@DaveTBlake
Copy link
Member

Strictly (by definition in the schema itself)

"major": { "type": "integer", "minimum": 0, "required": true, "description": "Bumped on backwards incompatible changes to the API definition" },
"minor": { "type": "integer", "minimum": 0, "required": true, "description": "Bumped on backwards compatible additions/changes to the API definition" },
"patch": { "type": "integer", "minimum": 0, "required": true, "description": "Bumped on any changes to the internal implementation but not to the API definition" }

a breaking change to the API requires a bump to the major version, however wanting to avoid version runaway during alpha only the first breaking change does that. Hence although this is a breaking change only the minor gets bumped as it is not the first breaking change. The major will then be bumped again to v12.0.0 for release of v19 - so releases are even numbers. Obviously we try to do braking changes early in the dev cycle.

To help JSON consumers spot changes in the commit history of the build it is also good to include [JSON] and [Breaking Change] in the commit title of breaking commits. Github labelling, although usefull during PR processing, is only visible when looking at Github.

For Leia I also maintained a forum thread that summarized changes, but I have been a bit lax for v19 so far.

@phunkyfish
Copy link
Contributor

So once this gets reviewed and approved it’s ok to go in.

@phunkyfish phunkyfish added the PR Cleanup: Needs Review This PR is good and ready for a review. Someone please review. label Mar 18, 2020
@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Mar 22, 2020
@DaveTBlake
Copy link
Member

Rebase the JSON version number @rmrector then the button is yours

@rmrector rmrector deleted the i-can-seek-clearly-now branch March 26, 2020 01:00
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Mar 26, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
@howie-f
Copy link
Contributor

howie-f commented Mar 29, 2020

@rmrector merging this pullrequest broke seeking with offical-kodi-remote (ios). for my personal branch i can revert it without (to me) obvious drawbacks, but was this intended and will be fixed later? (i doubt official-kodi-remote is under maintenance atm.)

@DaveTBlake DaveTBlake removed PR Cleanup: Merge Candidate Candidate for merging after PR cleanup PR Cleanup: Needs Review This PR is good and ready for a review. Someone please review. labels Mar 29, 2020
@phunkyfish
Copy link
Contributor

@howie-f is this the correct repo for the remote you are referring to: https://github.com/xbmc/Official-Kodi-Remote-iOS ?

@DaveTBlake
Copy link
Member

It was an intentional breaking change, and so it is up to JSON API consumers to adapt. This is problem for the iOS remote or any other unmaintained apps.

You could question the wisdom of making a breaking chance to primarily simplify the schema and remove duplicated parameters, but that is what has happened. It also claims to fix issue #15914.

@howie-f
Copy link
Contributor

howie-f commented Mar 29, 2020

@phunkyfish yeah, correct. installed through app-store.
@DaveTBlake i'm fine with that and don't question any wisdom. just telling i noticed this behaviour. that's it. sorry for the noise

@nkichukov
Copy link

For now, I will also have to revert this patch on my Matix builds, as the kodi remote ios app seek functionality is something I use on daily basis.

@basilgello
Copy link
Collaborator

We also need to ping @Tolriq as Yatse users will soon complain about this change a lot.

@Tolriq
Copy link
Contributor

Tolriq commented Apr 12, 2020

It's already fixed in Yatse beta, just not released due to Google issues ;)
But I also wonder why the need to break all the apps and millions users to try to fix the issue of one reported 5 years later.

@howie-f
Copy link
Contributor

howie-f commented Apr 12, 2020

i think it‘s a legit change and let‘s keep in mind that matrix isn‘t even alpha yet. but i’d just rather test alpha in the living-room with my ios-remote.

@Tolriq
Copy link
Contributor

Tolriq commented Apr 12, 2020

Not 5 years later (#6801) to avoid fixing a rare issue only one person have at the expanse of breaking nearly everyone using this, and without announcing a deprecation before. This is usually not the way to maintain a public API.

I care about Kodi users and it's not a nice move, from Yatse point of view this is nice as it will make all users of no more supported remotes search alternatives that works.

Sandmann79 added a commit to Sandmann79/xbmc that referenced this pull request Apr 15, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request May 5, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 3, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 5, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 7, 2020
[jsonrpc] [breakingchange]remove ambiguous and duplicate Player.Seek options
@graysky2
Copy link
Contributor

graysky2 commented Dec 29, 2020

Given xbmc/Official-Kodi-Remote-iOS#95, would it be sane for end-users wishing to have arrow key functionality within the official iOS app to simply revert this commit when compiling Matrix? Any unforeseen breakage by doing so?

@howie-f
Copy link
Contributor

howie-f commented Dec 29, 2020

@graysky2 i‘m doing the revert on my living room branch and have not seen any breakage. but the correct fix needs to go to (unmaintained) official ios remote.

groszdaniel added a commit to groszdaniel/kaidi that referenced this pull request Aug 21, 2023
Adapt to breaking change in the Kodi JSON-RPC protocol
xbmc/xbmc#15939
groszdaniel added a commit to groszdaniel/kaidi that referenced this pull request Aug 21, 2023
Adapt to breaking change in the Kodi JSON-RPC protocol
xbmc/xbmc#15939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change: JSON-RPC Type: Breaking change fix or feature that will cause existing functionality to change v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants