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

Discrepancy between CLI and JSON interfaces for XMLBrowser based queries #131

Closed
mapgccv opened this issue Jan 12, 2017 · 5 comments
Closed

Comments

@mapgccv
Copy link

mapgccv commented Jan 12, 2017

It seems that the JSON interface needs a player ID to execute the items query on any plugin, whilst the CLI does not.
CLI:

news items 0 5
ab%3Acd%3Aef%3A12%3A34%3A28 news items 0 5 title%3ANews id%3A55adb327.0 name%3AFeatured isaudio%3A0 hasitems%3A1 id%3A55adb327.1 name%3ALocal%20Stations%20(1) isaudio%3A0 hasitems%3A1 id%3A55adb327.2 name%3AShows%20(11%2B) isaudio%3A0 hasitems%3A1 id%3A55adb327.3 name%3AStations%20(25%2B) isaudio%3A0 hasitems%3A1 id%3A55adb327.4 name%3AExplore%20News isaudio%3A0 hasitems%3A1 count%3A5

works fine as shown.

JSON:

{"$id":"1","id":1,"method":"slim.request","params":[null,["news","items",  "0","5"]]}

does not work. Whilst:

{"$id":"1","id":1,"method":"slim.request","params":["ab:cd:ef:12:34:28",["news","items",  "0","5"]]}

works correctly.

Is this a bug?

@michaelherger
Copy link
Member

What if you passed an empty string rather than null as the device id?

@mapgccv
Copy link
Author

mapgccv commented Jan 13, 2017

Works fine indeed, my mistake. Sorry for this.

@mapgccv mapgccv closed this as completed Jan 13, 2017
@mapgccv mapgccv reopened this Jan 13, 2017
@mapgccv
Copy link
Author

mapgccv commented Jan 13, 2017

Nevermind, apologies again, I had tried with favorites and it was working fine. But anything else, e.g.:

{"$id":"1","id":1,"method":"slim.request","params":["",["news","items",  "0","5"]]}

does not, and actually gives the message:

The requested URL can't be reached

The service might be temporarily down or it may have moved permanently to a new web address.

The response status is empty. It means that the successful connection wasn't made. Check your request parameters.

@michaelherger
Copy link
Member

Oh well... send a client id :-)

@mapgccv
Copy link
Author

mapgccv commented Jan 13, 2017

So I shall :)
Thanks, just thought it's a curious discrepancy...

@mherger mherger closed this as completed Feb 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants