alshain Wrote:cool
Now compiling PHP... so I can test my own code too hehe
Let me know how you get on!
I had a quick tidy up today with the code, I have moved some stuff around...see what you think?
Cheers,
Kai.
kaigoh
Junior Member Posts: 23 Joined: Jan 2009 Reputation: 0 |
alshain Wrote:cool Let me know how you get on! I had a quick tidy up today with the code, I have moved some stuff around...see what you think? Cheers, Kai. |
| find quote |
alshain
Senior Member Posts: 145 Joined: Jul 2010 Reputation: 3 |
2011-01-04 14:09
Post: #22
Hey, I've update my code. You have a pull request.
|
| find quote |
kaigoh
Junior Member Posts: 23 Joined: Jan 2009 Reputation: 0 |
2011-01-05 13:55
Post: #23
alshain Wrote:Hey, I've update my code. You have a pull request. Done! Cheers mate, Kai. |
| find quote |
alshain
Senior Member Posts: 145 Joined: Jul 2010 Reputation: 3 |
2011-01-05 14:05
Post: #24
cool
|
| find quote |
neus
Junior Member Posts: 1 Joined: May 2011 Reputation: 0 |
2011-05-14 19:20
Post: #25
im trying to learn how this api works but cant get it to work right
the moviewall is showing now i want it to show just 1 movie $xbmcJson->VideoLibrary->GetMovieDetails ? ? someone can push me in the right direction ? thx in advantage
|
| find quote |
kaigoh
Junior Member Posts: 23 Joined: Jan 2009 Reputation: 0 |
neus Wrote:im trying to learn how this api works but cant get it to work right Hi neus, If you look at the code here: PHP Code: foreach($moviesRaw->movies as $movie) {You can see we have a variable $moviesRaw->movies that contains all of the movies in your library. To reference a particular movie, you would call $movieRaw->movies[x] (where x is the array key), i.e. $movieRaw->movies[0] would show the first movie in your collection. HTH, Kai. |
| find quote |
rickrude
Senior Member Posts: 161 Joined: Jun 2011 Reputation: 0 Location: New Zealand |
2011-12-28 02:11
Post: #27
Hey there
Any plans to update this class to support EDEN? |
| find quote |
ivarmedi
Junior Member Posts: 1 Joined: Dec 2011 Reputation: 0 Location: Sweden |
2011-12-30 22:15
Post: #28
rickrude Wrote:Hey there It's just small changes that are needed. Here's a diff output: [HTML]# This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- W:\xbmc_remote\application\libraries\xbmc_2.php +++ W:\xbmc_remote\application\libraries\xbmc_json.php @@ -230,6 +230,7 @@ 'id' => $uid ); + $json = array_filter($json); $request = json_encode($json); $ch = curl_init(); @@ -265,12 +266,12 @@ public function __construct(xbmcHost $xbmcHost) { parent::setUrl($xbmcHost->url()); - $this->populateCommands($this->rpc("JSONRPC.Introspect")->commands); + $this->populateCommands($this->rpc("JSONRPC.Introspect")->methods); } private function populateCommands($remoteCommands) { - foreach($remoteCommands as $remoteCommand) { - $rpcCommand = explode(".", $remoteCommand->command); + foreach($remoteCommands as $cmd => $remoteCommand) { + $rpcCommand = explode(".", $cmd); if(!class_exists($rpcCommand[0])) { $this->$rpcCommand[0] = new xbmcJsonCommand($rpcCommand[0], parent::getUrl(), $this); } [/HTML] I wrote a simple wrapper for CodeIgniter aswell, if someone is interested. Just let me know here (it's on another computer). |
| find quote |
rickrude
Senior Member Posts: 161 Joined: Jun 2011 Reputation: 0 Location: New Zealand |
2011-12-31 05:09
Post: #29
Thanks so much. You make it look so easy!
|
| find quote |
smilykoch
Junior Member Posts: 5 Joined: Jan 2012 Reputation: 0 |
2012-08-22 23:47
Post: #30
I know this post i old.. BUT!
could some1 please help me get this working with the current stable version of xbmcBuntu.. (EDEN?)? I cant seem to get it working ..the closest i can get is with the error: Code: Fatal error: Uncaught exception 'XbmcException' with message 'Missing config key: host' in C:\xampp\htdocs\Remote\xbmc.php:126 |
| find quote |