Release plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
(2019-12-20, 01:30)nessus Wrote: Ok... this works fine for widgets items provided by themoviedb.helper plugin:// path lists, but when used in movies section or for widgets with local path (playlist or library node) it throws a script error.... https://paste.kodi.tv/saqehupufu.kodi
Can the script do this automatically?. I mean play items that are provided by script's plugin:// paths and they are in local library and open kodi's video info dialog for all the others ?. I think this will save as of lot of hassle.

That's because ListItem.Property(tmdb_id) is empty, so you're not looking anything up. You need to use a condition in the skin to check that it's not empty before calling the player function i.e.
Code:
<onclick condition="!String.IsEmpty(ListItem.Property(tmdb_id))">RunPlugin(plugin://plugin.video.themoviedb.helper?info=play&amp;tmdb_id=$INFO[ListItem.Property(tmdb_id)]&amp;type=movie)</onclick>
Up to you what you want to do if it is empty. You can send &amp;query= when it is empty:
Code:
<onclick condition="String.IsEmpty(ListItem.Property(tmdb_id))">RunPlugin(plugin://plugin.video.themoviedb.helper?info=play&amp;query=$INFO[ListItem.Title]&amp;type=movie)</onclick>
Or you can do some other action (like call info dialog). I'd like to minimise forcing actions from the script side of things as much as possible and leave it up to skinners to decide.

(2019-12-20, 01:30)nessus Wrote: By the way the lists provided from the themoviedb.helper they all have the "Next Page" as the last item. I didn't test what happens if the content limit is set in less than 20 but i have all my widgets without limit an i would like to keep it that way.
I'll add an optional param to disable/enable next page item in next update.
EDIT: Added. By default next page item will only show in the browser. If you want to show it in a widget/videoinfo then add &amp;nextpage=True

(2019-12-20, 01:30)nessus Wrote: Also i notice that some of the items are missing the IMDB number which is available from the API. Example... "The Lord of the Rings: The Return of the King" in Top Rated Movies... https://api.themoviedb.org/3/movie/122?a...uage=en-US
Top Rated Movies api call doesn't return external IDs:
https://developers.themoviedb.org/3/movi...ted-movies
https://api.themoviedb.org/3/movie/top_r...-US&page=1

Only API calls that support append_to_response will return external IDs. However, if you've previously viewed the detailed item, the external IDs (and other details) will be cached and returned. Looking up the details for every item in the list causes a significant performance hit because each details call has to be done individually.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply


Messages In This Thread
RE: TheMovieDB Helper - by jurialmunkey - 2019-07-31, 11:47
RE: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners - by jurialmunkey - 2019-12-20, 02:59
Logout Mark Read Team Forum Stats Members Help
plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners2