Release script.embuary.info - get TMDb data - the little ExtendedInfo brother - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300) +---- Thread: Release script.embuary.info - get TMDb data - the little ExtendedInfo brother (/showthread.php?tid=346034) |
RE: script.embuary.info - the little ExtendedInfo brother - jurialmunkey - 2019-08-06 (2019-08-06, 15:17)the_bo Wrote: Great work again. Use latest version of my TMDb helper plugin for this type of functionality: Hidden list providing info:
RE: script.embuary.info - the little ExtendedInfo brother - jurialmunkey - 2019-08-06 (2019-08-05, 16:26)sualfred Wrote: @jurialmunkey Looking great so far. I'll skin up the windows tomorrow and give it a proper trial then. In my plugin I provide the TMDB id as ListItem.Property(tmdb_id) and type as ListItem.Property(tmdb_type) So should be able to do: <onclick>RunScript(script.embuary.info,call=$INFO[ListItem.Property(tmdb_type)],tmbd_id=$INFO[ListItem.Property(tmdb_id)])</onclick> RE: script.embuary.info - the little ExtendedInfo brother - sualfred - 2019-08-06 @jurialmunkey Nope, <onclick> won't work. It will run the script on top of the current instance. I monitor the <onclick> events and override them as soon as both properties are available. This results in a closing of the current dialog and passing the script entry point again, but keeping the closed dialog in the memory and it will be added to a history stack. With this approach the script is always "alive" and never ends until all dialogs were closed. If you hit "back" it monitors the action and reopens the last dialog from the history stack/memory without any performance impact or recollecting all informations again and again. Edit: Dialog manager: https://github.com/sualfred/script.embuary.info/blob/master/resources/lib/tmdb_main.py#L70-L89 Onclick monitor: https://github.com/sualfred/script.embuary.info/blob/master/resources/lib/tmdb_main.py#L200-L215 RE: script.embuary.info - the little ExtendedInfo brother - Hitcher - 2019-08-06 (2019-08-06, 10:02)sualfred Wrote: @Hitcher Cheers. RE: script.embuary.info - the little ExtendedInfo brother - sualfred - 2019-08-06 It took me a few hours until my brain understood what I wanted to achieve, so here is a little bit more explanation. - The script stays active as long as it's alive - On dialog openings ( doModal() ) the script is "on hold" as long as the modal dialog isn't closed. - The dialog isn't deleted from the memory and is still available with all informations like focus position etc. as long as the script is alive and doesn't reach its end. - By running it again, it will reach its end and: A) the dialog history is lost because it gets deleted from memory and cannot be reopened. B) The script will run from the beginning which is more expensive and time consuming - To bypass this I'm taking the control of the routing by providing the wanted actions of the currently closed dialog to the dialog manager. A simplified mind map of the workflow: RE: script.embuary.helper - a (maybe) skin helper service / widgets alternative - Hitcher - 2019-08-06 Really pleased this script closes cleanly when using Dialog.Close(all) because it means I can finally use the 'Press play to resume' function when using the X-ray feature while playing videos - ExtendedInfo used to crash and not load again. Thanks. RE: script.embuary.info - the little ExtendedInfo brother - sualfred - 2019-08-06 Yep, I'm a little bit suprised that everything works so well. By the way, I've added a two more calls: By external ID: runscript(script.embuary.info,call={tv or movie},external_id={imdbnumber or tvdb-id}) 'Query'-method extended with a optional year argument: runscript(script.embuary.info,call={tv or movie},query={search string},year={release year}) And OMDB (own API key required) is supported for movies with imdbnumber (tmdb has those) and for tvshows by title and year. But only for the details screen to reduce the amount of omdb calls. The free API key only has 1000 requests a day. RE: script.embuary.info - the little ExtendedInfo brother - the_bo - 2019-08-07 (2019-08-06, 15:37)jurialmunkey Wrote:(2019-08-06, 15:17)the_bo Wrote: Great work again. Thanks a million this will bring more delight to the skin. Can the bio info be cached also so can display the info much quicker while scrolling plus being able to show the bio while offline. Much appreciated RE: script.embuary.info - the little ExtendedInfo brother - jurialmunkey - 2019-08-07 @the_bo See my response here: https://forum.kodi.tv/showthread.php?tid=345847&pid=2875160#pid2875160 Short answer is yes. Any request made to an API with my plugin is cached to simplecache (details cached for 14 days, lists cached for 24 hours). If the cache for that request exists, then my plugin will use the cached version instead of making an api call. RE: script.embuary.info - the little ExtendedInfo brother - the_bo - 2019-08-07 (2019-08-07, 01:57)jurialmunkey Wrote: @the_bo Awesome thanks for info. Could you possibly add a setting to enter the number of days to cache. As I have lot of movies would prefer having ratings and such stored for few months. Is batch fetching possible to automatically fetch and update cache ratings for all movies in library or have you to scroll through the list manually to fetch during each focused item at a time. It's not a problem as I can have an autoscroll delay In the library that scrolls through all the movies during the night and fetches the details. Looking forward to developments on this. Cheers RE: script.embuary.info - the little ExtendedInfo brother - jurialmunkey - 2019-08-07 @the_bo - replied to you in my thread to keep this thread on topic: https://forum.kodi.tv/showthread.php?tid=345847&pid=2875188#pid2875188 RE: script.embuary.info - the little ExtendedInfo brother - Hitcher - 2019-08-07 @sualfred would it be asking too much to get the runtime and/or certification if they're available? Thanks. RE: script.embuary.info - the little ExtendedInfo brother - sualfred - 2019-08-07 Sure, I'll add it. The certifications will be based on the configured language. RE: script.embuary.info - the little ExtendedInfo brother - Hitcher - 2019-08-07 Many thanks. RE: script.embuary.info - the little ExtendedInfo brother - sualfred - 2019-08-07 @Hitcher Both is added on GitHub. I also improved the caching. Let me know if you will face issues. |