Heads-up: How to deal with content types / media types
#13
Sorry to be a pain, found a little issue regarding this topic. The Kodi json api is currently outputting some strange results for the type field.
Instead of type "album" it's outputting "Compilation" or "Album" etc. while it should be just "album" imo.
Because I use the type from the json api and set that as content type in the listitems it's resulting in errors like: Invalid media type "Compilation"

Is this behaviour intended and should I work around it in my addon by converting the values to "album" ?

PHP Code:
{u'rating'0u'year'1972u'musicbrainzalbumid'u'be960473-e5bd-46ea-aeae-86190ca7356a'u'style': [], u'mood': [], u'title'u'The Ultimate Fan Extras Collection'u'fanart'u'image://smb%3A%2F%2Fhomeserver%2FData%2FMuziek%2FCollectie%2FM%2FMichael%20Jackson%2Ffanart.jpg/'u'artistid': [2256], u'label'u'The Ultimate Fan Extras Collection'u'albumid'4542u'theme': [], u'type'u'Compilation'u'thumbnail'u'image://smb%3A%2F%2Fhomeserver%2FData%2FMuziek%2FCollectie%2FM%2FMichael%20Jackson%2FThe%20Ultimate%20Fan%20Extras%20Collection%2Ffolder.jpg/'u'description'u''u'genre': [u'Pop;70s;80s;Soul;Dance;Disco;Easy Listening;R&B;Soundtrack'], u'genreid': [552055315532553355345535], u'dateadded'u'2016-07-24 01:01:20'u'artist': [u'Michael Jackson'], u'albumlabel'u''u'musicbrainzalbumartistid': [u'f27ec8db-af05-4f36-916e-3d57f91ecf5e'], u'displayartist'u'Michael Jackson'u'playcount'0

Note that all other json endpoints (e.g. for movies etc) report the type field lowercase and only with the types that are globally excepted as in the first post of this topic.
Reply


Messages In This Thread
RE: Heads-up: How to deal with content types / media types - by User 224999 - 2017-01-05, 00:07
Logout Mark Read Team Forum Stats Members Help
Heads-up: How to deal with content types / media types1