2021-01-01, 03:45
Nevermind, I got it working with Chrome. It seems to have an issue with firefox, the window never appears and Kodi hangs until I kill the firefox.exe process.
(2021-01-26, 16:58)kingkiller Wrote: I'm doing some tests with jsonRPC and the 'Files.GetDirectory' method and I noticed that when collecting items from any show, they come out of order.
For example, inside Kodi, the Mad Man show has 8 seasons and the first one appears at the top as Season 1, and the last one at the end as Season 8, ok, when I make the call via jsonRPC, the return does not follow this order, the the first element should be Season 1, but in fact, everything gets mixed up, the same thing happens with episodes, they are mixed within the season.
Does anyone know why this happened?
(2021-01-26, 17:26)Varstahl Wrote:I think you understand, but I'll send you two example images.(2021-01-26, 16:58)kingkiller Wrote: I'm doing some tests with jsonRPC and the 'Files.GetDirectory' method and I noticed that when collecting items from any show, they come out of order.
For example, inside Kodi, the Mad Man show has 8 seasons and the first one appears at the top as Season 1, and the last one at the end as Season 8, ok, when I make the call via jsonRPC, the return does not follow this order, the the first element should be Season 1, but in fact, everything gets mixed up, the same thing happens with episodes, they are mixed within the season.
Does anyone know why this happened?
Not entirely sure I understood your question, but there's a high chance that the entries you're getting are as we get them from Amazon, while to display them in Kodi we use sorting.
(2021-01-26, 18:05)Varstahl Wrote: I've never delved into RPC too much, but each episode and season have (at least on ListItem level) their season and episode entries set. Since they're numerical they can be easily sorted that way. I'm not familiar with it and do not have time to experiment on this atm, so I can't help you further, but if you have questions ask away.
(2021-01-26, 21:57)Varstahl Wrote: I don't think there's a hard and fast rule for this. Honestly I hated the way PrimeVideo provides content on its platform, which is why I started working on a Kodi addon to fit my needs. The data sent by the server is still semi-random, and even the scraping hits and misses, so there's no guarantee of continuity when getting data from Amazon servers.
The options I had then were two: get them all sorted by us, manually, before adding the data to the Kodi listing (and at times there are thousands of entries), or just let Kodi do its thing which is also customizable by the user. Obviously I let Kodi do its thing, so that users can reverse or play with sorting options.
So, depending on what you are doing there are multiple ways to go at it, it just depends on what do you need.
python:
return json.loads(
xbmc.executeJSONRPC(
json.dumps({
'jsonrpc': '2.0',
"method": method,
"params": {
'directory': directory,
'properties': [
'season' ,
'title' ,
'file' ,
'imdbnumber' ,
'originaltitle' ,
'year' ,
'episode' ,
],
},
'id': 1
})
)
)
URL: plugin://plugin.video.amazon-test/<region>/<commands>
Command: browse/<path>/<GTIs>
GTIs: <TV Show GTI>/<Season GTI>/<Episode GTI>