Kodi Community Forum

Full Version: plugin.video.themoviedb.helper - Access to TheMovieDb API for Skinners
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
@bsoriano - You should be able to get a specific episode using the following library node:
Code:
videodb://tvshows/titles/-1/-1/-1/-1/?xsp=%7b%22rules%22%3a%7b%22and%22%3a%5b%7b%22field%22%3a%22tvshow%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%22$INFO[ListItem.TvShowTitle]%22%5d%7d%2c%7b%22field%22%3a%22season%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%22$INFO[ListItem.Season]%22%5d%7d%2c%7b%22field%22%3a%22episode%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%22$INFO[ListItem.Episode]%22%5d%7d%5d%7d%2c%22type%22%3a%22episodes%22%7d


Easiest way to create a library node xsp is using library node editor. Create a node with the rules you need, and then open the node and copy the container.folderpath
If you use sublimetext3 with kodidevkit, you can grab an info label direct from command palette (ctrl+shift+p) --> "KodiDevKit: JSON-RPC: Display Infolabels" --> "Container.FolderPath". Then just replace the dummy values you entered in the node editor with the infolabels.

For instance, to get the above path I created an Node with content episodes. Then I added rules "TvShow is Breaking Bad", "Season is 4", "Episode is 4" -- 4 is a good value to use because it isn't used in the common url % encodings, so it is easy to spot. That gave me:
Code:
videodb://tvshows/titles/-1/-1/-1/-1/?xsp=%7b%22rules%22%3a%7b%22and%22%3a%5b%7b%22field%22%3a%22tvshow%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%22Breaking Bad%22%5d%7d%2c%7b%22field%22%3a%22season%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%224%22%5d%7d%2c%7b%22field%22%3a%22episode%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%224%22%5d%7d%5d%7d%2c%22type%22%3a%22episodes%22%7d

And I just replaced my values with the appropriate infolabels.


-- If you need to get a tmdb helper path, you can just do a query:
Code:
plugin://plugin.video.themoviedb.helper/?info=details&query=$INFO[ListItem.TvShowTitle]&season=$INFO[ListItem.Season]&$INFO[ListItem.Episode]&type=episode
(2020-01-21, 09:22)jurialmunkey Wrote: [ -> ]@bsoriano - You should be able to get a specific episode using the following library node:
Code:
videodb://tvshows/titles/-1/-1/-1/-1/?xsp=%7b%22rules%22%3a%7b%22and%22%3a%5b%7b%22field%22%3a%22tvshow%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%22$INFO[ListItem.TvShowTitle]%22%5d%7d%2c%7b%22field%22%3a%22season%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%22$INFO[ListItem.Season]%22%5d%7d%2c%7b%22field%22%3a%22episode%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%22$INFO[ListItem.Episode]%22%5d%7d%5d%7d%2c%22type%22%3a%22episodes%22%7d


Easiest way to create a library node xsp is using library node editor. Create a node with the rules you need, and then open the node and copy the container.folderpath
If you use sublimetext3 with kodidevkit, you can grab an info label direct from command palette (ctrl+shift+p) --> "KodiDevKit: JSON-RPC: Display Infolabels" --> "Container.FolderPath". Then just replace the dummy values you entered in the node editor with the infolabels.

For instance, to get the above path I created an Node with content episodes. Then I added rules "TvShow is Breaking Bad", "Season is 4", "Episode is 4" -- 4 is a good value to use because it isn't used in the common url % encodings, so it is easy to spot. That gave me:
Code:
videodb://tvshows/titles/-1/-1/-1/-1/?xsp=%7b%22rules%22%3a%7b%22and%22%3a%5b%7b%22field%22%3a%22tvshow%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%22Breaking Bad%22%5d%7d%2c%7b%22field%22%3a%22season%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%224%22%5d%7d%2c%7b%22field%22%3a%22episode%22%2c%22operator%22%3a%22is%22%2c%22value%22%3a%5b%224%22%5d%7d%5d%7d%2c%22type%22%3a%22episodes%22%7d

And I just replaced my values with the appropriate infolabels.


-- If you need to get a tmdb helper path, you can just do a query:
Code:
plugin://plugin.video.themoviedb.helper/?info=details&query=$INFO[ListItem.TvShowTitle]&season=$INFO[ListItem.Season]&$INFO[ListItem.Episode]&type=episode

@jurialmunkey , thank you again! I apologize for the noob questions.  I will look further into library node editor.

Regards,

Bart
Hey @jurialmunkey, sorry if it`s been asked already. But is there any way to add my entire trakt collection (for tv shows) to my kodi library in one go, ias opposed to doing it one by one?

Smile
(2020-01-21, 19:52)tinnyskillz Wrote: [ -> ]Hey @jurialmunkey, sorry if it`s been asked already. But is there any way to add my entire trakt collection (for tv shows) to my kodi library in one go, ias opposed to doing it one by one?

Smile
No.

I don't know why you would want to do that - you would be doubling up on your local content.
(2020-01-22, 08:10)jurialmunkey Wrote: [ -> ]
(2020-01-21, 19:52)tinnyskillz Wrote: [ -> ]Hey @jurialmunkey, sorry if it`s been asked already. But is there any way to add my entire trakt collection (for tv shows) to my kodi library in one go, ias opposed to doing it one by one?

Smile
No.

I don't know why you would want to do that - you would be doubling up on your local content. 
It would be the only source. my Kodi library is currently empty Smile
@jurialmunkey just started playing around with this addon and I have a small request - the option to force a viewtype ID please.

Many thanks.
(2020-01-22, 19:07)Hitcher Wrote: [ -> ]@jurialmunkey just started playing around with this addon and I have a small request - the option to force a viewtype ID please.

Many thanks.
Do you mean when browsing the plugin through video addons?

And do you mean as a user setting in the addon or as an option for skinners?
EDIT: Nevermind, I see you can do this in skin code.

Thanks.
Just an FYI - plugin://plugin.video.themoviedb.helper?info=similar&type=tv&imdb_id=$INFO[ListItem.IMDBNumber] doesn't work and I have to use plugin://plugin.video.themoviedb.helper?info=similar&type=tv&query=$INFO[ListItem.TVShowTitle] instead.

When looking further into the problem it seems TV shows don't have the tt prefix attached to ListItem.IMBDNumber - instead they either have no prefix or have xx instead. Episodes seem to have no prefix at all.

EDIT: Using the TMDB TV scraper.
Request time.

Any chance the Cast list - plugin://plugin.video.themoviedb.helper?info=cast&type=movie&imdb_id=$INFO[ListItem.IMDBNumber] - can also include the role as ListItem.Label2 please?

​​​​​​​Many thanks.
(2020-01-25, 12:45)Hitcher Wrote: [ -> ]Just an FYI - plugin://plugin.video.themoviedb.helper?info=similar&type=tv&imdb_id=$INFO[ListItem.IMDBNumber] doesn't work and I have to use plugin://plugin.video.themoviedb.helper?info=similar&type=tv&query=$INFO[ListItem.TVShowTitle] instead.

When looking further into the problem it seems TV shows don't have the tt prefix attached to ListItem.IMBDNumber - instead they either have no prefix or have xx instead. Episodes seem to have no prefix at all.

EDIT: Using the TMDB TV scraper.

If it doesn't have 'tt' at the start, then it's not an IMDb ID.
Some of the tvshow scraper addons misuse the IMDbNumber field and put TMDb or TVDb ID in it instead.

It's annoying as there is nothing to indicate what "type" of ID it is - otherwise you could pass it to the appropriate param in the plugin as it will also take &tmdb_id= or &tvdb_id=

Nothing I can do from my end of things other than suggest that the scrapers stop misusing the IMDbNumber field.

The 'xx' is a Kodi bug inside info dialog for addons. See thread here:
https://forum.kodi.tv/showthread.php?tid=346179
(2020-01-25, 13:05)Hitcher Wrote: [ -> ]Request time.

Any chance the Cast list - plugin://plugin.video.themoviedb.helper?info=cast&type=movie&imdb_id=$INFO[ListItem.IMDBNumber] - can also include the role as ListItem.Label2 please?

​​​​​​​Many thanks.

Can you test latest git version? Role should be set to label2 now.
(2020-01-25, 13:20)jurialmunkey Wrote: [ -> ]
(2020-01-25, 12:45)Hitcher Wrote: [ -> ]Just an FYI - plugin://plugin.video.themoviedb.helper?info=similar&type=tv&imdb_id=$INFO[ListItem.IMDBNumber] doesn't work and I have to use plugin://plugin.video.themoviedb.helper?info=similar&type=tv&query=$INFO[ListItem.TVShowTitle] instead.

When looking further into the problem it seems TV shows don't have the tt prefix attached to ListItem.IMBDNumber - instead they either have no prefix or have xx instead. Episodes seem to have no prefix at all.

EDIT: Using the TMDB TV scraper.

If it doesn't have 'tt' at the start, then it's not an IMDb ID.
Some of the tvshow scraper addons misuse the IMDbNumber field and put TMDb or TVDb ID in it instead.

It's annoying as there is nothing to indicate what "type" of ID it is - otherwise you could pass it to the appropriate param in the plugin as it will also take &tmdb_id= or &tvdb_id=

Nothing I can do from my end of things other than suggest that the scrapers stop misusing the IMDbNumber field.

The 'xx' is a Kodi bug inside info dialog for addons. See thread here:
https://forum.kodi.tv/showthread.php?tid=346179 
No problem, and I just realised I can add a condition to check that the IMDB number actually has a tt prefix.

Thanks.
(2020-01-25, 13:42)jurialmunkey Wrote: [ -> ]
(2020-01-25, 13:05)Hitcher Wrote: [ -> ]Request time.

Any chance the Cast list - plugin://plugin.video.themoviedb.helper?info=cast&type=movie&imdb_id=$INFO[ListItem.IMDBNumber] - can also include the role as ListItem.Label2 please?

Many thanks.

Can you test latest git version? Role should be set to label2 now.  
Thanks, will give a go later.

EDIT: Works perfectly, many thanks.
Another query, sorry. Is there a way to clear the contents of a list when uploading a window/dialog?

The reason I ask is because when a list is filled the contents are obviously cached so when the list used again for a different source the last contents are visible before the list is updated. I'd prefer the list to just be empty for a moment before filling the newer content. This isn't specific to just your addon.

Thanks.