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.
(2023-11-29, 10:22)zellinho Wrote: [ -> ]Hi, since yesterday I have a lot of crashes when trying to start a movie on right clicking the poster in the widget an trying to choose a player. It sometimes dont opens the player list at all, sometimes tries to open then crashes and sometimes works as excpected. I have to add that I use skin Arctic Horizon Reloaded and could not test yet if its Skin related. But maybe other user experience same issue since yesterdays update?

Without a debug log it is impossible for me to know what the issue is....
Yeah, sure...I realised the issue before I went to sleep yesterday and now I am at work. Hope to find some time to test in the evening if its only Skin related or generally and will create log then.
I wanted to place a bug report on Github now, but someone was faster...and the Master File you put there for testing solved the issue for me.
Thanks soo much @jurialmunkey ! This is has been extremely helpful.

Unfortunately i've another thing to ask you. Not sure if i'm doing something wrong or if it's just the way TheMovieDb Helper is designed. I'm using script.skinshortcuts with my skin to create customizeable menus and it seems whenever I select any kind of TV Shows sub-menu from within TheMovieDb Helper as a widget, I cannot enter into the TV show from the main menu's widget view. Pressing enter/ok on the TV Show does nothing from the widget view. When I go into TheMovieDb Helper add-on directly from video add-ons and navigate to the same TV Shows sub-menu, I'm able to enter any TV show just fine and view it's seasons and episodes. I dont seem to have this issue with other video add-ons from the widgets.

Is this a settings issue, a problem with skinShortcuts, something missing in TheMovieDB Helper? Is there anything I can do from within my Skin to allow the user to be able to navigate into the TV Show from the widgets view?

It should be noted that my current `Default select action in addon` is set to Play, which works fine for Movies, but not TV Shows.
@dstealth

Are you setting the target attribute of the content? Generally you need to do something like

xml:

<content target="videos">plugin://plugin.path.goes.here</content>

The target attribute tells Kodi which window any folder items should open in. Because you want to open it in MyVideoNav.xml then target should be videos. You can see the target names for window XML here: https://kodi.wiki/view/Window_IDs

In skinshortcuts it really depends on how you are using it but there's usually a widgetTarget property that you can use.

IF you're repurposing a skinshortcuts submenu to build widget templates then you'd do something like this (note I set a fallback to "videos" for the target in case it is empty as videos is probably most likely).
xml:

<items insert="widgets">
<property name="widgetPath" tag="property" attribute="name|list" />
<property name="widgetTarget" tag="property" attribute="name|widgetTarget" />
<property name="widgetTarget">videos</property>
<controls>
<control type="list">
[...]
<content target="$SKINSHORTCUTS[widgetTarget]">$SKINSHORTCUTS[widgetPath]</content>
</control>
<controls>
<items>

Also note that if you're defining custom shortcuts in skinshortcuts overrides then you need to specify the target there too
https://github.com/BigNoid/script.skinsh...widgets.md
ahh you're a brilliant person!! Thank you! I would have never considered it was that. Never did realize what that attribute was for so I had been omitting it from my templates. I'll make sure I include that as a preselected value with an option to change while setting the widget. Thank you again for the prompt reply!!
Hi Jurial,
Lately TMDBH has been behaving unsually. 
Its marked "The Recruit" & " The Night agent" as watched ( even though its not marked as watched in Kodi Library or Trakt.
Also its not adding these 2 shows to the library ?
When i click add to Library its does not give confirmation and goes on to searching TV Shows instead.
I am able to add any other show without any issue.
I am on Kodi 20.2 on windows
Could you kindly see what possible has gone wrong
(2023-12-02, 22:16)shaktoo Wrote: [ -> ]Hi Jurial,
Lately TMDBH has been behaving unsually. 
Its marked "The Recruit" & " The Night agent" as watched ( even though its not marked as watched in Kodi Library or Trakt.
Also its not adding these 2 shows to the library ?
When i click add to Library its does not give confirmation and goes on to searching TV Shows instead.
I am able to add any other show without any issue.
I am on Kodi 20.2 on windows
Could you kindly see what possible has gone wrong

Hard to tell anything without debug logs.

It sounds like there is something in your library which is giving a false positive match for these shows. You can test if that's the case by disabling the "get additional details from the local Kodi library database" TMDbHelper setting and then restarting Kodi to check if the shows are still marked as watched.

If it is that issue, then that would also be why they would be skipped adding as TMDbHelper thinks that they are already in the library.

You can see logs for what TMDbHelper added to the library and what it skipped adding from your monitored lists in addon_data/plugin.video.themoviedb.helper/log_library

BTW, I am able to add both of these shows to my library without issue, so it is almost certainly a false positive somewhere in your library.
(2023-12-03, 09:37)jurialmunkey Wrote: [ -> ]
(2023-12-02, 22:16)shaktoo Wrote: [ -> ]Hi Jurial,
Lately TMDBH has been behaving unsually. 
Its marked "The Recruit" & " The Night agent" as watched ( even though its not marked as watched in Kodi Library or Trakt.
Also its not adding these 2 shows to the library ?
When i click add to Library its does not give confirmation and goes on to searching TV Shows instead.
I am able to add any other show without any issue.
I am on Kodi 20.2 on windows
Could you kindly see what possible has gone wrong

Hard to tell anything without debug logs.

It sounds like there is something in your library which is giving a false positive match for these shows. You can test if that's the case by disabling the "get additional details from the local Kodi library database" TMDbHelper setting and then restarting Kodi to check if the shows are still marked as watched.

If it is that issue, then that would also be why they would be skipped adding as TMDbHelper thinks that they are already in the library.

You can see logs for what TMDbHelper added to the library and what it skipped adding from your monitored lists in addon_data/plugin.video.themoviedb.helper/log_library

BTW, I am able to add both of these shows to my library without issue, so it is almost certainly a false positive somewhere in your library.

Thanks Jurial for your kind suggestions. It makes sense what you are saying I will definitely try that.
Because of these and some other issues with another skin that I use I am in middle of doing a completely fresh install with a fresh Library.
Will update you with the progress.
Cheers
Hi @jurialmunkey ,

I've run into another issue. Seems my widgets are not updating with new content. Its been a week now n they all still have the same content. I've tried deleting all cache via the TMDbHelper settings but still the same content appears. If I do a fresh kodi re-install with my skin, then TMDbHelper populates the widgets with newer content.

Here's an example widget path being used:
xml:

plugin://plugin.video.themoviedb.helper/?info=discover&tmdb_type=movie&tmdb_id=None&with_id=True&with_separator=AND&sort_by=release_date.desc&primary_release_date.lte=t-0&release_date.lte=t-0&with_release_type=4+%2F+5+%2F+6&vote_count.gte=5&vote_average.gte=5&widget=true&reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)]

Also, I noticed the reload=$INFO[Window(Home).Property(TMDbHelper.Widgets.Reload)] but not sure what that's for or if I need to do anything for it.
@dstealth - If you deleted all the cache (and restarted Kodi) then that's what the server is returning for that request.

Reload param is unrelated -- it's a skin trick to let TMDbHelper refresh the list container by changing the value in the window property (Kodi sees path change so it reloads the container).

Almost certainly it is your use of release type. The release type data on TMDb is crap to say the least.

For instance look at the release data for Shawshank Redemption in the USA region on this page:
https://www.themoviedb.org/movie/278-the...n/releases

The Digital/Physical/TV filter wouldn't even capture Shawshank if your region is set to USA, and that's a movie which has definitely had several physical releases since its 1994 theatrical release. If the #1 movie on IMDb doesn't haven't physical release data for USA, then it is very unlikely there will be good release data for other movies.
@jurialmunkey thanks for the quick response. The odd thing is the exact same request returns 2 different result sets. 1) On Kodi that was set up on Dec. 2, and 2) Kodi that was fresh installed today.

I used postman to test the request with two different primary_release_date.lte's: 1) 2023-12-02 and 2) 2023-12-11. As expected, request (1) returns the same results as the week old Kodi, and request (2) returns current results of the fresh Kodi. By this logic i'm lead to believe that TheMovieDb Helper isnt converting the primary_release_date.lte=t-0 properly. I would assume t-0 would always equate to the current day's date but seems as though it's being calculated as the date the request was first called....

If you dont mind i'm going take a look at TheMoveDb Helper code and see if I can find the logic that does this and step through it with both my scenarios and see where it might go wrong.
I figured it out, it was the TheMovieDb Helper Language and country Setting. On my Kodi that's been setup for a week my Language and Country was set to English (Canada) and on the fresh install it defaulted to English (United States of America) and thus the different results.

Thanks for your help and patience jurialmunkey!
(2023-12-12, 08:40)dstealth Wrote: [ -> ]I figured it out, it was the TheMovieDb Helper Language and country Setting. On my Kodi that's been setup for a week my Language and Country was set to English (Canada) and on the fresh install it defaulted to English (United States of America) and thus the different results.

Thanks for your help and patience jurialmunkey!

I was so close to mentioning that the setting would be resetting to default region on fresh install -- Damn! Really could've saved you some headache there!
Hi Big Grin

I noticed that some ListItem.Property(RottenTomatoes_Image) are empty. I just recently started using an mdblist API key so I think it has to do with that.

Should I use a variable to provide that image instead?

Thanks Smile