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.
@Fuchs2468 - Can you give me the full log please? Use https://paste.kodi.tv/ to upload.
Hi jurialmunkey,

I can't get the correct cast list for the new 'Mr. & Mrs. Smith (2024)' TV show; I just get the cast for 'Mr And Mrs North (1952)' instead.

Here's my path:

plugin://plugin.video.themoviedb.helper?info=cast&tmdb_type=tv&aggregate=true&query=$INFO[ListItem.TVShowTitle]&nextpage=false

If I add the year I get 'Mr. Villain's Day Off (2024)'.

So it seem to only be searching for the word Mr, any way around this?

Many thanks.
(2024-02-01, 08:58)jurialmunkey Wrote: [ -> ]@Fuchs2468 - Can you give me the full log please? Use https://paste.kodi.tv/ to upload.

Here is my error log for version 5.2.15.
https://paste.kodi.tv/vusutonete.kodi

I didn't have any errors when I downgraded to version 5.2.14.
Hello, jurialmunkey.

I was referred to your addon by Hitcher (thank you both!)

I'm sending some coffee your way for getting back my favorite feature in KODI (somehow ExtendedInfo Script stopped working recently and that's sad for me).

Anyway, I have a question.  The actor descriptive bio (I don't know what the area that has a nice write up of the actor) doesn't scroll when there is more info than fits in the box.  Is there something I need to enable for that to work, or is this something being worked on?

Thank you again!
Tjoe
(2024-02-02, 14:19)Hitcher Wrote: [ -> ]I can't get the correct cast list for the new 'Mr. & Mrs. Smith (2024)' TV show; I just get the cast for 'Mr And Mrs North (1952)' instead.
plugin://plugin.video.themoviedb.helper?info=cast&tmdb_type=tv&aggregate=true&query=$INFO[ListItem.TVShowTitle]&nextpage=false

It's the ampersand. You're effectively providing the URI paramstring as:
Code:

?info=cast&tmdb_type=tv&aggregate=true&query=Mr. & Mrs. Smith&nextpage=false

Which urllib will read as:

json:

{
"info": "cast",
"tmdb_type": "tv",
"aggregate": "true",
"query": "Mr. ",
"Mrs. Smith": "",
"nextpage": "false"
}

To use a special character & ? = , : / in a paramstring you need to percent encode it. Kodi's skinning engine doesn't have a method to do that, so you're effectively stuck.

You could use SkinVariables to first percent encode the query before appending to the URI but it feels like quite a roundabout way to get there:
https://github.com/jurialmunkey/script.s...-container

If you have any way to get the TV show ID (either tmdb_id imdb_id or tvdb_id) then you will get much better (i.e. exact) results rather than using a query search.

e.g. if you use the service monitor, can get the TMDb ID with $INFO[Container(99950).ListItem.Property(TMDb_ID)] to use in path like so:
Code:

?info=cast&tmdb_type=tv&aggregate=true&nextpage=false&tmdb_id=$INFO[Container(99950).ListItem.Property(TMDb_ID)]

Then all you need to do is check that ID is filled before showing your cast widget. The service will do a much more effective lookup of the item because it can handle all these special cases. Plus it is more efficient if you use multiple related lists as you only do the query lookup once (in the service) rather than for every individual list.
(2024-02-03, 02:12)Tjoe70s Wrote: [ -> ]I'm sending some coffee your way for getting back my favorite feature in KODI (somehow ExtendedInfo Script stopped working recently and that's sad for me).

Anyway, I have a question.  The actor descriptive bio (I don't know what the area that has a nice write up of the actor) doesn't scroll when there is more info than fits in the box.  Is there something I need to enable for that to work, or is this something being worked on?

Thanks Big Grin

Whether and when a textbox scrolls will be up to the skin. TMDbHelper only supplies the text of the info and leaves the rest up to the skin. That's a big difference from ExtendedInfo which had a scripted window which forced the skin into displaying the info in a particular way. TMDbHelper doesn't do anything like that - it's all up to however the skinner wants to display the info.
(2024-02-02, 22:43)Fuchs2468 Wrote: [ -> ]
(2024-02-01, 08:58)jurialmunkey Wrote: [ -> ]@Fuchs2468 - Can you give me the full log please? Use https://paste.kodi.tv/ to upload.

Here is my error log for version 5.2.15.
https://paste.kodi.tv/vusutonete.kodi

I didn't have any errors when I downgraded to version 5.2.14.

Thanks. I can't recreate myself but fairly sure I know what the cause of the issue is.

I think this commit should fix it (will be in next repo update which I'll push a bit later today)
https://github.com/jurialmunkey/plugin.v...df138f9407
(2024-02-03, 07:47)jurialmunkey Wrote: [ -> ]
(2024-02-02, 14:19)Hitcher Wrote: [ -> ]I can't get the correct cast list for the new 'Mr. & Mrs. Smith (2024)' TV show; I just get the cast for 'Mr And Mrs North (1952)' instead.
plugin://plugin.video.themoviedb.helper?info=cast&tmdb_type=tv&aggregate=true&query=$INFO[ListItem.TVShowTitle]&nextpage=false

It's the ampersand. You're effectively providing the URI paramstring as:
Code:

?info=cast&tmdb_type=tv&aggregate=true&query=Mr. & Mrs. Smith&nextpage=false

Which urllib will read as:

json:

{
"info": "cast",
"tmdb_type": "tv",
"aggregate": "true",
"query": "Mr. ",
"Mrs. Smith": "",
"nextpage": "false"
}

To use a special character & ? = , : / in a paramstring you need to percent encode it. Kodi's skinning engine doesn't have a method to do that, so you're effectively stuck.

You could use SkinVariables to first percent encode the query before appending to the URI but it feels like quite a roundabout way to get there:
https://github.com/jurialmunkey/script.s...-container

If you have any way to get the TV show ID (either tmdb_id imdb_id or tvdb_id) then you will get much better (i.e. exact) results rather than using a query search.

e.g. if you use the service monitor, can get the TMDb ID with $INFO[Container(99950).ListItem.Property(TMDb_ID)] to use in path like so:
Code:

?info=cast&tmdb_type=tv&aggregate=true&nextpage=false&tmdb_id=$INFO[Container(99950).ListItem.Property(TMDb_ID)]

Then all you need to do is check that ID is filled before showing your cast widget. The service will do a much more effective lookup of the item because it can handle all these special cases. Plus it is more efficient if you use multiple related lists as you only do the query lookup once (in the service) rather than for every individual list.
Yeah, I am using the service monitor and that fixed the problem. Smile

Just a little issue now and that's the fact that when I open the info dialog on a different video the old cast list is displayed briefly. I seem to remember there's a way to clear lists but can't think what it is; do you know?

EDIT: Fixed it with a simple fade animation:

<animation condition="Container(500).IsUpdating" effect="fade" end="0" start="100" time="0">Conditional</animation>

Many thanks.
Using &amp;tmdb_id=$INFO[Container(99950).ListItem.Property(TMDb_ID)] doesn't work when I'm viewing episode info as the id changes to an unknown value.

Can you not lookup episode cast lists?

EDIT: Also don't work for seasons, so I guess I need a way to use the TV show TMDb_ID at those levels. Is there a detailed list of extra properties (as in non-Kodi ones) added to the service monitor list?

Thanks.

EDIT: Found what I needed in Arctic Fuse - Container(99950).ListItem.Property(TVShow.TMDb_ID)
(2024-02-03, 08:47)jurialmunkey Wrote: [ -> ]I think this commit should fix it (will be in next repo update which I'll push a bit later today)
https://github.com/jurialmunkey/plugin.v...df138f9407

Thanks for the update, the error has been fixed.
(2024-02-04, 21:23)Fuchs2468 Wrote: [ -> ]
(2024-02-03, 08:47)jurialmunkey Wrote: [ -> ]I think this commit should fix it (will be in next repo update which I'll push a bit later today)
https://github.com/jurialmunkey/plugin.v...df138f9407

Thanks for the update, the error has been fixed.

Excellent! Thanks for confirming.
@jurialmunkey Apologies for asking again but I've just discovered some more useful labels in Arctic Fuse Container(99950).ListItem.Property(Director.n.TMDb_ID)), (Container(99950).ListItem.Property(Director.n.job), and (Container(99950).ListItem.Property(Director.n.name) that aren't listed anywhere in the wiki.

EDIT: Sorry, they were listed. Blush

(2024-02-03, 14:20)Hitcher Wrote: [ -> ]Is there a detailed list of extra properties (as in non-Kodi ones) added to the service monitor list?

Thanks.

EDIT: Found what I needed in Arctic Fuse - Container(99950).ListItem.Property(TVShow.TMDb_ID)
Thanks.
(2024-01-20, 07:57)jurialmunkey Wrote: [ -> ]TMDbHelper uses script.module.requests for web requests, and I believe the requests module gets its cacert.pem file from script.module.certifi -- so making sure those modules are up-to-date would be the first thing to check (maybe you turned off auto-updates and its stuck on an old version where the certificate doesn't match up).

I'm not that knowledgable on how Kodi manages/stores SSL certs beyond that, so I can't really give more advice than that but it's at least a start.
I have checked, both addons are up to date with the latest version available in repository.

script.module.certifi v2023.5.7
script.module.requests v2.31.0

Who do you think could know more about this? I am getting this error pretty much every time I start watching a movie.

Code:
info <general>: [plugin.video.themoviedb.helper]
ConnectionError:  HTTPSConnectionPool(host='webservice.fanart.tv', port=443): Max retries exceeded with url: /v3/movies/443791?api_key=fcca59bee130b70db37ee43e63f8d6c1 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1136)')))
Suppressing retries for 30 seconds
v5.2.17 has been released yesterday?
i've got it Autoupdated but can't find any info on your Github?
Hello, can someone please guide me here? I was able to add a widget that displays the Calendar for TV Shows airing for this fortnight by using "Trakt>Your TV Shows Calendar>This Fortnight"

I am now looking to add the same widget for movies. However I am unable to find such Calendar option for movies. Am I missing something?