XBMC-PHP-RPC - a PHP JSON-RPC library supporting HTTP and TCP

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Mindzai Offline
Fan
Posts: 333
Joined: Aug 2010
Reputation: 0
Post: #41
OK I compiled the latest nightly and found that the new RPC implementation did break the library but it was fairly trivial to fix. The new version in git supports both implementations, though you obviously would need to adjust the client code (eg the parameter format) if you want to support both implementations in your own apps. To that end, the *Client classes now have an isLegacy() method which you can call to find out which RPC implementation is being used and adjust accordingly. The example script has been updated to use this method.
find quote
gugahoi Offline
Fan
Posts: 716
Joined: Aug 2009
Reputation: 4
Post: #42
Mindzai Wrote:OK I compiled the latest nightly and found that the new RPC implementation did break the library but it was fairly trivial to fix. The new version in git supports both implementations, though you obviously would need to adjust the client code (eg the parameter format) if you want to support both implementations in your own apps. To that end, the *Client classes now have an isLegacy() method which you can call to find out which RPC implementation is being used and adjust accordingly. The example script has been updated to use this method.

AWESOME! Thanks for such a quick response! Will test it out with some nightlies and see if they work as expected.
find quote
Mindzai Offline
Fan
Posts: 333
Joined: Aug 2010
Reputation: 0
Post: #43
gugahoi Wrote:AWESOME! Thanks for such a quick response! Will test it out with some nightlies and see if they work as expected.

No problem Smile Let me know if you run in to any problems.
find quote
Romep Offline
Junior Member
Posts: 20
Joined: Feb 2011
Reputation: 0
Post: #44
gugahoi Wrote:
Code:
"sort": { "method": "videotitle" }

Are there any other sort methods? They are not documented on the JSON Wiki page.
find quote
gugahoi Offline
Fan
Posts: 716
Joined: Aug 2009
Reputation: 4
Post: #45
Romep Wrote:Are there any other sort methods? They are not documented on the JSON Wiki page.

I'm not sure, I believe you're best option would be to go on IRC and ask there.

Regarding the Nightly compatibility, it seems like it's working as it should! Thanks for the great job!
find quote
Romep Offline
Junior Member
Posts: 20
Joined: Feb 2011
Reputation: 0
Post: #46
Where do you get 10.5? If i download from git, i only get 11.0 PRE, but there json doesn't seem to work.
find quote
gugahoi Offline
Fan
Posts: 716
Joined: Aug 2009
Reputation: 4
Post: #47
11.0 pre works fine for me. Just look at the examples and use the non legacy ones.
find quote
Mindzai Offline
Fan
Posts: 333
Joined: Aug 2010
Reputation: 0
Post: #48
Romep Wrote:Where do you get 10.5? If i download from git, i only get 11.0 PRE, but there json doesn't seem to work.

I honestly can't remember where 10.5 came from! As gugahoi says though it should work with 11.0 too. Bear in mind that the RPC interface in XBMC has been fairly radically updated since Dharma so old commands may not still work. The library itself should function fine though.
find quote
Romep Offline
Junior Member
Posts: 20
Joined: Feb 2011
Reputation: 0
Post: #49
Ok, it works. Don't know what i did. But now i got another problem. I try to GetMovieDetails, but it doesn't accept my parameter? GetMovies runs perfectly.

Code:
$movie = $rpc->VideoLibrary->GetMovieDetails(
                        array(
                            "movieid" => $this->movieid
                        )
        );

$this->movieid is (for example) 292.
find quote
samdret Offline
Junior Member
Posts: 18
Joined: Jan 2010
Reputation: 0
Post: #50
Romep Wrote:Ok, it works. Don't know what i did. But now i got another problem. I try to GetMovieDetails, but it doesn't accept my parameter? GetMovies runs perfectly.

Code:
$movie = $rpc->VideoLibrary->GetMovieDetails(
                        array(
                            "movieid" => $this->movieid
                        )
        );

$this->movieid is (for example) 292.

There is no such thing as GetMovieDetails. I suggest you add a fields parameter to your GetMovies and use that information to show details.
find quote
Post Reply