JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC

  Thread Rating:
  • 8 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ErlendSB Offline
Senior Member
Posts: 186
Joined: Sep 2008
Reputation: 3
Location: Norway
Post: #1696
Sounds perfect.

I'll keep any eye on the Introspect Nerd
find quote
Montellese Offline
Team-XBMC Developer
Posts: 3,630
Joined: Jan 2009
Reputation: 34
Location: Switzerland
Post: #1697
Hehe usually I announce all (semi-)major additions/changes in here. But that stuff isn't going to be available until after Eden has been released.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
doozer Offline
Junior Member
Posts: 32
Joined: Jun 2011
Reputation: 0
Post: #1698
I'm trying to get a list of all playlists, including user created ones:

Code:
{"jsonrpc": "2.0", "method": "Playlist.GetPlaylists", "id": "Playlist.GetPlaylists"}

But even though I have a user created .m3u playlist, I only get:
Code:
{"id":"Playlist.GetPlaylists","jsonrpc":"2.0","result":[{"playlistid":0,"type":"audio"},{"playlistid":1,"type":"video"},{"playlistid":2,"type":"picture"}]}

Is there another request I should be sending to see the custom playlists, as I seem to only get the system defined ones?

Thanks,
Matt.
find quote
doozer Offline
Junior Member
Posts: 32
Joined: Jun 2011
Reputation: 0
Post: #1699
Hi All,

Anyone know how to request a list of movies in the library that match a genreid?

Thanks,
Matt.
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,715
Joined: Nov 2011
Reputation: 47
Location: Nantes - France
Post: #1700
doozer Wrote:I'm trying to get a list of all playlists, including user created ones:

Code:
{"jsonrpc": "2.0", "method": "Playlist.GetPlaylists", "id": "Playlist.GetPlaylists"}

But even though I have a user created .m3u playlist, I only get:
Code:
{"id":"Playlist.GetPlaylists","jsonrpc":"2.0","result":[{"playlistid":0,"type":"audio"},{"playlistid":1,"type":"video"},{"playlistid":2,"type":"picture"}]}

Is there another request I should be sending to see the custom playlists, as I seem to only get the system defined ones?

Thanks,
Matt.
Hello.

I have post the same question few days ago Wink

Here is the response of Montellese : http://forum.xbmc.org/showpost.php?p=101...count=1680

Sorry for my english, but, you know, I'm French so ...

find quote
doozer Offline
Junior Member
Posts: 32
Joined: Jun 2011
Reputation: 0
Post: #1701
mikebzh44 Wrote:Hello.

I have post the same question few days ago Wink

Here is the response of Montellese : http://forum.xbmc.org/showpost.php?p=101...count=1680

Thanks for the heads up. Crazy searching for answers in 170 pages of replies!
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,715
Joined: Nov 2011
Reputation: 47
Location: Nantes - France
Post: #1702
Hello.

I'm using this request :

Code:
json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "special://profile/playlists/video/cartoons.xsp", "media": "video", "properties": ["originaltitle"]}, "id": 1}')

But I have a warning in the log :

Code:
WARNING: CUtil::GetMatchingSource... no matching source found for [special://profile/playlists/video/cartoons.xsp]

But request's result is OK.

Is it due to Beta 3 ?

Sorry for my english, but, you know, I'm French so ...

find quote
Montellese Offline
Team-XBMC Developer
Posts: 3,630
Joined: Jan 2009
Reputation: 34
Location: Switzerland
Post: #1703
That warning might be because I added checks so you can't access locked sources through JSON-RPC until you unlocked them in XBMC GUI. For that I added a call to CUtil::GetMatchingSource(). Just ignore the warning. Will see if I can get rid of it for JSON-RPC.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,715
Joined: Nov 2011
Reputation: 47
Location: Nantes - France
Post: #1704
Thanks.

Sorry for my english, but, you know, I'm French so ...

find quote
mikebzh44 Offline
Posting Freak
Posts: 1,715
Joined: Nov 2011
Reputation: 47
Location: Nantes - France
Post: #1705
An other question.

If I want to count the number of movies watched and unwatched in a specific playlist, I have to :
- use Files.GetDirectory to retrieve all the movies from the playlist
- for each movie, I have to get playcount with VideoLibrary.GetMovieDetails
- if playcount = 0 so movie is unwatched, otherwise is watched

There is no way to put a filter on the playlist to get only unwatched movies or watched movies ?

Sorry if it's a silly question Sad

Sorry for my english, but, you know, I'm French so ...

find quote
Montellese Offline
Team-XBMC Developer
Posts: 3,630
Joined: Jan 2009
Reputation: 34
Location: Switzerland
Post: #1706
No there is no filtering (yet, but for Files.GetDirectory there probably never will be because as the method name says it operates on files and not on a database). But you don't need the extra call to VideoLibrary.GetMovieDetails, you can retrieve the "playcount" property directly from Files.GetDirectory.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
mikebzh44 Offline
Posting Freak
Posts: 1,715
Joined: Nov 2011
Reputation: 47
Location: Nantes - France
Post: #1707
On more time "Thank for the tip" !

I haven't notice that resume and playcount were inherited properties.

Sorry for my english, but, you know, I'm French so ...

find quote
spike411 Offline
Junior Member
Posts: 12
Joined: Apr 2011
Reputation: 0
Location: Prague, Czechia
Post: #1708
Hello,
would it be possible to add Player.Play and Player.Pause methods (in addition to Player.PlayPause) for "discrete" playback control (so clients don't have to "decide" depending on the player status)? If it makes any sense.

Thanks
(I hope such a request belongs here)
find quote
Montellese Offline
Team-XBMC Developer
Posts: 3,630
Joined: Jan 2009
Reputation: 34
Location: Switzerland
Post: #1709
Such a feature request has been provided a week or two ago at http://trac.xbmc.org/ticket/12564. See the Trac ticket for information on how it will probably be implemented.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
Tolriq Offline
Donor
Posts: 2,280
Joined: Jun 2009
Reputation: 67
Location: France
Post: #1710
About this ticket Smile

I've got a new need that comes with it, it was already discussed before i think but can't remember when, and get into this new need Sad

Do you think it's possible for some of the player operations to add the support of PlayerId -1 that will pause / play whatever is currently running, even if music and pictures are running ?

See : http://forum.xbmc.org/showthread.php?p=1...ost1018502 for more details of why it may be needed.

One solution actually since playerid are limited to 1 2 3 is to send a batch of the 3 commands, but perhaps the -1 would be more coder friendly.

Yatse 2 : Media Center Remote Control for Touch Screens
Yatse, the Xbmc Remote and Widgets for Android
find quote
Post Reply