Kodi Community Forum

Full Version: kodi/pluging json spec compliance problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Where should problems be reported when finding a problem in compliance when using a plugin and the json transport?

For instance using the SoundCloud plugin the Player.OnPlay notification packet does not comply with the documented spec.
Specifically params>data>item>artist is returned as an array:

{
"jsonrpc": "2.0",
"method": "Player.OnPlay",
"params": {
"data": {
"item": {
"artist": [
"Guardian Politics Weekly"
],
"title": "US presidential candidates and Northern Ireland ??? Politics Weekly podcast",
"track": 1,
"type": "song"
},
"player": {
"playerid": 0,
"speed": 1
}
},
"sender": "xbmc"
}
}


But the api specifies a string for type song:

"artist": {
"default": "",
"type": "string"
},



I can understand if the app is supplying bad data (ie multiple artists), but it is the responsibility of the engine to not to participate populating with incompatible data.
Normally data validation belongs on the front end but Kodi has to expect anything and everything from open plugins
Ive also found Pandora plugin v2.3.2 by rivy also issues a notification with artists value as array...
I imagine I will find this time and again as some types store artist as an array such as Audio.Details.Media, and others as string...
what is correct??

{
"jsonrpc": "2.0",
"method": "Player.OnPlay",
"params": {
"data": {
"item": {
"album": "More Monsters And Sprites",
"artist": [
"Skrillex"
],
"title": "Ruffneck (FULL Flex)",
"type": "song"
},
"player": {
"playerid": 0,
"speed": 1
}
},
"sender": "xbmc"
}
}
Artists are arrays since a very long time, are you referring to the introspect documentation or the Wiki (the Wiki is not up to date and reliable at all).
introspect.
"version": "6.21.2", yes i know im not quite up to date...

but Notifications.Item for song type clearly states not array but string
Yep but problem still present in schema Smile

If Montellese read here it should be fixed, or you need to open a trac issue.