Req Video.Fields.Episode missing 'Studio' and 'Genres'
#1
When using VideoLibrary.GetEpisodeDetails you can't return studio or genres. Could this be added?
Reply
#2
genre and studio are attached to shows and not episodes so perhaps the request for VideoLibrary.GetEpisodeDetails could include a Video.Details.TVShow casting

https://kodi.wiki/view/JSON-RPC_API/v13#...ls.Episode

expand Video.Details.Episode to include the parent show's Video.Details.TVShow object


same as returned from https://kodi.wiki/view/JSON-RPC_API/v13#...howDetails

https://kodi.wiki/view/JSON-RPC_API/v13#...ils.TVShow


eliminates the need to make 2 calls
Reply
#3
The episode view in the video database pulls these fields in from the tvshow table. Is there a JSON ROC call to get views vs. raw table access ? If not direct SQLite calls would work. I do it all the time.

Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#4
@jepsizofye, @jbinkley60 Thanks you both for the feedback, at the moment I'm just using 2 JSON-RPC calls one for the episode details and another to look up the base tv show for the studio and genre. It works ok as I can cache the tv show lookup so I don't need to repeat it for episodes from the same show. It would just be nice for that data to be already included in the episode details, to cut down on calls.
Reply
#5
right on, good solution for now, hopefully the kodi devs consider the alteration for the next iteration of the JSON-RPC

-----

while it would be possible to pull the information direct from the database with a single sql statement

i believe that method actually would add far more code than a single second rpc call if you are not already accessing the database

(the need to locate and identify the database file location, considering potential for the user using mysql or another external database before ever making a request)
Reply
#6
(2023-04-02, 17:32)jepsizofye Wrote: right on, good solution for now, hopefully the kodi devs consider the alteration for the next iteration of the JSON-RPC

-----

while it would be possible to pull the information direct from the database with a single sql statement

i believe that method actually would add far more code than a single second rpc call if you are not already accessing the database

(the need to locate and identify the database file location, considering potential for the user using mysql or another external database before ever making a request)

You are quite correct with regards to the amount of code required for a direct SQL call. Direct SQL calls might have made sense depending on the larger context and the number of calls. SQL calls are much faster then JSON RPC calls. I concur the 2 JSON RPC calls seems like the simplest approach for now.


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#7
I'm not really a  C programmer, so might be reading things wrong but it seems like VideoLibrary.GetEpisodeDetails method calls
c++:
bool CVideoDatabase::GetEpisodeInfo()
which in turn generates query
sql:
"select * from episode_view where idEpisode=%i",idEpisode
so I'm guessing the info is there, just need to mod the JSON-RPC API to return it.

scott s.
.
Reply
#8
I have an open PR against master to add these for VideoLibrary.GetEpisodeDetails and VideoLibrary.GetEpisodes

23112 (PR)

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
Video.Fields.Episode missing 'Studio' and 'Genres'0