Kodi Community Forum
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174)
+---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263)



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Talguy - 2015-01-29

I was looking more for a signal telling me if media is playing or not. I've tried GetActivePlayers, I guess I'll just have to stick with it and add some extra processing code to determine what player is playing media.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2015-01-29

You could listen for player notifications.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Anthirian - 2015-01-31

Since I don't follow this topic actively I was wondering if there are any changes to the JSONRPC API I should know about now that I'm getting my addon ready for a Helix release. According to the addon.xml wiki page the current version of xbmc.json is 6.20.0, which is different from Gotham. I then took a look at the JSON-RPC wiki page, but it appears it hasn't been updated yet. The Helix API changes page also has not been updated with JSON-RPC information. To avoid having to search this topic and gather all pieces of information regarding the changes I was hoping for a quick overview. Is the wiki page going to be updated any time soon?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2015-02-24

@Montellese : Ultra small detail but well since I see it I report Smile

"Video.Fields.TVShow": {
"extends": "Item.Fields.Base",
"items": { "type": "string",
"description": "Requesting the cast field will result in increased response times",
"enum": [ "title", "genre", "year", "rating", "plot",
"studio", "mpaa", "cast", "playcount", "episode",
"imdbnumber", "premiered", "votes", "lastplayed",
"fanart", "thumbnail", "file", "originaltitle",
"sorttitle", "episodeguide", "season", "watchedepisodes",
"dateadded", "tag", "lastplayed", "art" ]
}

"lastplayed" is present 2 times.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2015-02-24

(2015-02-24, 18:54)Tolriq Wrote: @Montellese : Ultra small detail but well since I see it I report Smile

"Video.Fields.TVShow": {
"extends": "Item.Fields.Base",
"items": { "type": "string",
"description": "Requesting the cast field will result in increased response times",
"enum": [ "title", "genre", "year", "rating", "plot",
"studio", "mpaa", "cast", "playcount", "episode",
"imdbnumber", "premiered", "votes", "lastplayed",
"fanart", "thumbnail", "file", "originaltitle",
"sorttitle", "episodeguide", "season", "watchedepisodes",
"dateadded", "tag", "lastplayed", "art" ]
}

"lastplayed" is present 2 times.

Thanks, already fixed.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mzanetti - 2015-03-11

Hello, since this seems to be the place to report issues, I'm having some troubles with the PVR part:

* I think there are some announcements missing. For example when pausing the player, usually the JSON api emits an OnPause/OnPlay announcement when pausing/resuming. Same for seeking, don't get an OnSeek announcement either.

* Another one is Player.GetItem: When playing a recording the type should be set to "recording" but it's set to "unknown".

Thanks a lot!


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2015-03-11

(2015-03-11, 00:52)mzanetti Wrote: Hello, since this seems to be the place to report issues, I'm having some troubles with the PVR part:

* I think there are some announcements missing. For example when pausing the player, usually the JSON api emits an OnPause/OnPlay announcement when pausing/resuming. Same for seeking, don't get an OnSeek announcement either.

* Another one is Player.GetItem: When playing a recording the type should be set to "recording" but it's set to "unknown".

Thanks a lot!

Yes there are still a lot of things missing for PVR in JSON-RPC. I'm surprised that the Player notifications don't work but I don't really know how PVR playback works.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2015-03-11

Since 14.2 should be out one day I started dropping Eden and updating my internal database to be more robust for future and it seems there's some strange things with audio library.

AudioLibrary.GetArtists :
- Without albumartistsonly or set to false : Return all artists but not "Various Artists"
- With albumartistsonly set to true : Return "Various Artists" but not the compilation artists.

In both cases : The field compilationartist is always false when it should be set to true for compilation artists in the first case.

So there's no way to have a complete list with needed details.

IMO First case should return Various Artist artist as it have a valid id and details and compilationartist field should work. (And specially since that from other users database this name is locally translated).

AudioLibrary.GetAlbums :
Does not return albums with an empty title even if they are in the database.

And AudioLibrary.GetSongs will return AlbumId corresponding to those unreturned albums.

AudioLibrary.GetAlbumDetails will return information about those and return them as label Singles

So I suppose this is more or less an internal way of handling things like all songs must belong to an album so let's use no title albums to indicate that it's a single ?

I suppose I can use this hack on my side too, if no album found then it's normal and a single but I find that quite ugly.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lappskij - 2015-03-11

@Montellese
Just a quick question, hope that is alright.
Any chance that you are working on implementing support for the widely used TAG mood in the future programming of the Kodi player?
I see that this is already a implemented tag field in Kodi developers scraper TheAudioDB.

Thanks.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2015-03-11

(2015-03-11, 13:26)Tolriq Wrote: Since 14.2 should be out one day I started dropping Eden and updating my internal database to be more robust for future and it seems there's some strange things with audio library.

AudioLibrary.GetArtists :
- Without albumartistsonly or set to false : Return all artists but not "Various Artists"
- With albumartistsonly set to true : Return "Various Artists" but not the compilation artists.

In both cases : The field compilationartist is always false when it should be set to true for compilation artists in the first case.

So there's no way to have a complete list with needed details.

IMO First case should return Various Artist artist as it have a valid id and details and compilationartist field should work. (And specially since that from other users database this name is locally translated).

AudioLibrary.GetAlbums :
Does not return albums with an empty title even if they are in the database.

And AudioLibrary.GetSongs will return AlbumId corresponding to those unreturned albums.

AudioLibrary.GetAlbumDetails will return information about those and return them as label Singles

So I suppose this is more or less an internal way of handling things like all songs must belong to an album so let's use no title albums to indicate that it's a single ?

I suppose I can use this hack on my side too, if no album found then it's normal and a single but I find that quite ugly.

Thanks for the detailed feedback and analysis. I never knew the music db as good as the video db and since the complete re-write for musicbrainz I have completely lost the overview so it's highly possible that there are some issue. AFAIK the integration of compilations and singles have always been more of a hack than anything else in core so JSON-RPC is probably suffering from that.

(2015-03-11, 14:07)Lappskij Wrote: @Montellese
Just a quick question, hope that is alright.
Any chance that you are working on implementing support for the widely used TAG mood in the future programming of the Kodi player?
I see that this is already a implemented tag field in Kodi developers scraper TheAudioDB.

Thanks.

Isn't there already a mood property? I don't really know the music library / database that well but IIRC there is one but it's not really scraped by any scraper!?!?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2015-03-11

@Montellese maybe you have enough knowledge or know someone that can confirm what is the Various Artist in DB (since it can be translated) and that it's normal it's not retrieved ?

And confirm the song must belong to album and album without title = singles ? So I can see how I handle on my side either as wanted or as hack that will be fixed in future release.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2015-03-11

AFAIK "Various Artists" is one of the worst hacks I've seen in the music database. It is stored in the database with it's translated name so when you change the GUI language you basically loose that entry (i.e. the "albumartsitsonly" flag doesn't work anymore) or get it in the wrong language (in library view etc).

And yes it looks like songs with an empty album title are considered singles.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2015-03-11

Ok Sad

Do you know any hacks like infolabel or someway to get this translated Various Artists string ?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lappskij - 2015-03-11

[/quote]

Isn't there already a mood property? I don't really know the music library / database that well but IIRC there is one but it's not really scraped by any scraper!?!?

[/quote]

There is a mood property, but as far as I know there is no API support for the tag. I have re-tagged my whole library with MusicBrainz Picard and ID3v2 version 2.4, and thereby gotten a head start on all new feature possibilities like ie. moods. Only asking because making smart playlists in Kodi based on mood tags would be awesome, but as of now not possible due to missing api integration. So even if all the new info from the new ID3v2 version 2.4 can be scraped with TheAudioDB (since the Universal scraper doesn't support this yet), it can't be written in to the Kodi DB and used by addons. Am I right?

Thanks!


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Lappskij - 2015-03-11

(2015-03-11, 15:10)Montellese Wrote:
(2015-03-11, 13:26)Tolriq Wrote: Since 14.2 should be out one day I started dropping Eden and updating my internal database to be more robust for future and it seems there's some strange things with audio library.

AudioLibrary.GetArtists :
- Without albumartistsonly or set to false : Return all artists but not "Various Artists"
- With albumartistsonly set to true : Return "Various Artists" but not the compilation artists.

In both cases : The field compilationartist is always false when it should be set to true for compilation artists in the first case.

So there's no way to have a complete list with needed details.

IMO First case should return Various Artist artist as it have a valid id and details and compilationartist field should work. (And specially since that from other users database this name is locally translated).

AudioLibrary.GetAlbums :
Does not return albums with an empty title even if they are in the database.

And AudioLibrary.GetSongs will return AlbumId corresponding to those unreturned albums.

AudioLibrary.GetAlbumDetails will return information about those and return them as label Singles

So I suppose this is more or less an internal way of handling things like all songs must belong to an album so let's use no title albums to indicate that it's a single ?

I suppose I can use this hack on my side too, if no album found then it's normal and a single but I find that quite ugly.

Thanks for the detailed feedback and analysis. I never knew the music db as good as the video db and since the complete re-write for musicbrainz I have completely lost the overview so it's highly possible that there are some issue. AFAIK the integration of compilations and singles have always been more of a hack than anything else in core so JSON-RPC is probably suffering from that.

(2015-03-11, 14:07)Lappskij Wrote: @Montellese
Just a quick question, hope that is alright.
Any chance that you are working on implementing support for the widely used TAG mood in the future programming of the Kodi player?
I see that this is already a implemented tag field in Kodi developers scraper TheAudioDB.

Thanks.

Isn't there already a mood property? I don't really know the music library / database that well but IIRC there is one but it's not really scraped by any scraper!?!?




There is a mood property, but as far as I know there is no API support for the tag. I have re-tagged my whole library with MusicBrainz Picard and ID3v2 version 2.4, and thereby gotten a head start on all new feature possibilities like ie. moods. Only asking because making smart playlists in Kodi based on mood tags would be awesome, but as of now not possible due to missing api integration. So even if all the new info from the new ID3v2 version 2.4 can be scraped with TheAudioDB (since the Universal scraper doesn't support this yet), it can't be written in to the Kodi DB and used by addons. Am I right?

Thanks!