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.
@mikeSiLVO

Ah no worries - didn't realise you meant you were working on a local version.

Did you see my edit in previous post? Can you test with latest nexus master of TMDbHelper?

I was able to reproduce the issue you were experiencing and I think it's an animation timing issue which the latest master version of TMDbHelper should fix. (get the actual master not the latest release). i.e. this one: https://github.com/jurialmunkey/plugin.v.../nexus.zip
(2023-10-28, 08:22)jurialmunkey Wrote: [ -> ]@mikeSiLVO

Ah no worries - didn't realise you meant you were working on a local version.

Did you see my edit in previous post? Can you test with latest nexus master of TMDbHelper?

I was able to reproduce the issue you were experiencing and I think it's an animation timing issue which the latest master version of TMDbHelper should fix. (get the actual master not the latest release). i.e. this one: https://github.com/jurialmunkey/plugin.v.../nexus.zip

Tested and working perfectly! Thank you very much Smile

EDIT: Is there a way to get the tmdb id or imdb id from just the ListItem.DBID?
(2023-10-28, 16:12)mikeSiLVO Wrote: [ -> ]Tested and working perfectly! Thank you very much Smile

EDIT: Is there a way to get the tmdb id or imdb id from just the ListItem.DBID?

No problem!

Can you expand a bit by what you mean with ListItem.DBID and what you're trying to do specifically?

Why not just use ListItem.UniqueID(tmdb) or ListItem.UniqueID(imdb) if you already have the ListItem?

If the ListItem doesn't have those UniqueIDs, the DBID won't help help figure out what they are. DBID is simply a number which indicates which order items were added to your library. It doesn't contain any special meaning related to the movie or show itself (other than where that info is in your local db).
(2023-10-29, 04:02)jurialmunkey Wrote: [ -> ]No problem!

Can you expand a bit by what you mean with ListItem.DBID and what you're trying to do specifically?

Why not just use ListItem.UniqueID(tmdb) or ListItem.UniqueID(imdb) if you already have the ListItem?

If the ListItem doesn't have those UniqueIDs, the DBID won't help help figure out what they are. DBID is simply a number which indicates which order items were added to your library. It doesn't contain any special meaning related to the movie or show itself (other than where that info is in your local db).

I have been messing about with TMDbH on the home window and it looks like that my multiple ReloadSkin calls caused an issue in Omega that probably does not exist. When using widgets provided by other scripts that are not TMDbH related it appeared that the TMDbHelper.MonitorContainer list was empty and I have been using that to fill in the tmdb_id= ListItem.UniqueID(tmdb) for lookups so I thought a workaround for my missing info would help me call the script correctly. I am starting to suspect that a skin reload, when certain conditions apply, makes that list appear to be empty. I originally thought it was a home screen limitation but I think its just some Kodi gobbledygook. Everything works on an application restart Confused

EDIT: I feel like I have to mention how flawless the window history is. I am consistently amazed how well that works, no matter how far down the rabbit hole I go Big Grin
(2023-10-29, 09:56)mikeSiLVO Wrote: [ -> ]I have been messing about with TMDbH on the home window and it looks like that my multiple ReloadSkin calls caused an issue in Omega that probably does not exist. When using widgets provided by other scripts that are not TMDbH related it appeared that the TMDbHelper.MonitorContainer list was empty and I have been using that to fill in the tmdb_id= ListItem.UniqueID(tmdb) for lookups so I thought a workaround for my missing info would help me call the script correctly.

If the skin reloads, Kodi will clear the containers. Since TMDbH will only update the container when it detects the item changed, if you're still on the same item after a reload that would explain it being empty -- moving off the list and back to it should retrigger it (unless something else has gone wrong - which should be indicated in the log).

Also you can use fallbacks via variable here if its empty. The recommendations script accepts all the standard lookup params as other lists that are based on an item:
https://github.com/jurialmunkey/plugin.v...parameters

Best is TMDb ID as it doesn't need to do any lookup. Second best is IMDb ID as it will still ensure a perfect match for movies but will need to do a lookup. Then you can fallback to using query+year for movies and query+episode_year for tvshows (episode_year=$INFO[ListItem.Year] is needed for tvshows as each season will have a different year). This is the same order that the service monitor uses to do its own lookup.

Just use a variable to fallback to using a query if the IDs are empty.




(2023-10-29, 09:56)mikeSiLVO Wrote: [ -> ]EDIT: I feel like I have to mention how flawless the window history is. I am consistently amazed how well that works, no matter how far down the rabbit hole I go Big Grin

Haha thanks Big Grin

That's good to hear because I can't tell you how much of an effing pain it was to think through all the permutations of test scenarios when coding it!
I am using Arctic: Zephyr - Reloaded on Kodi 20.2 (20.2.0) but anytime I open the Kodi application or waiting for a widget to load the the settings themoviedb helper screen keeps popping up how can I stop that?

Thank you for all your help in advance
(2023-11-01, 02:10)m0unir1178 Wrote: [ -> ]I am using Arctic: Zephyr - Reloaded on Kodi 20.2 (20.2.0) but anytime I open the Kodi application or waiting for a widget to load the the settings themoviedb helper screen keeps popping up how can I stop that?

Thank you for all your help in advance

This is not behaviour generated by the plugin.

This sounds like an issue with the skin, or, more likely, with how you have configured the skin. You would need to ask the skin author.

Often this type of thing happens when you base one widget container off of the items in another widget container with items that aren't folders and thus aren't suitable to be used this way -- i.e. it sounds like you've linked a folder containing the item which runs a command to open the settings dialog and then are trying to open another widget based upon that item. To fix it, you need to not do that.
I was wondering if it is possible to use TMDbH as a replacement for how I am currently using Embuary Helper? Was hoping to be able to either exclude_key/exclude_value or filter_key/filter_value so it only displays items currently in the library but I am not sure how to achieve that. Also curious to know if that is doable OOTB without having to change any settings in the plugin, for example, does one have to enable the "Get additional details from local Kodi DB" setting?

Thanks Smile
Thank you for your response. To be honest, I'm not entirely sure I grasped your explanation regarding how to approach the widget issue. I attempted to investigate the widget as per your suggestion, but regrettably, I couldn't find a solution. My next step will be to contact the skin creator and seek their input. Thank you once more for your assistance.
(2023-11-02, 18:00)mikeSiLVO Wrote: [ -> ]I was wondering if it is possible to use TMDbH as a replacement for how I am currently using Embuary Helper? Was hoping to be able to either exclude_key/exclude_value or filter_key/filter_value so it only displays items currently in the library but I am not sure how to achieve that. Also curious to know if that is doable OOTB without having to change any settings in the plugin, for example, does one have to enable the "Get additional details from local Kodi DB" setting?

Thanks Smile

It can be done but is dependent on the user having enabled that setting. Ive been hesitant to allow skins to override that setting forcibly as it can cause problems/slow-downs for users with very large libraries.

You could use a variable though to check if the user has that setting enabled and only apply the filter if they do e.g.
Code:
<value condition="Addon.SettingBool(plugin.video.themoviedb.helper,local_db)">

In terms of filtering by DBID it's as simple as adding:
Code:
&amp;exclude_key=dbid&amp;exclude_value=is_empty

e.g. for Recommendations dialog, say you want Recommended movies but only ones in the library:
Code:
5000|info=recommendations&amp;exclude_key=dbid&amp;exclude_value=is_empty|true|info

Also note that excluding simply removes items from the page which don't match so you will end up with fewer items (e.g. page of 20 but only 4 in library then list will only have 4 recommendations).

To help with that, you might want to extend the page length param to retrieve more pages (more pages = slower so that's the obvious downside).
e.g. to get 40 recs instead of normal 20 bump length to 2
Code:
5000|info=recommendations&amp;length=2&amp;exclude_key=dbid&amp;exclude_value=is_empty|true|info


Side note: You might also be interested in the filter dir functionality in SkinVariables which allows you to apply the same type of filtering to other plugins and library paths:
https://github.com/jurialmunkey/script.s...irectories
(2023-11-03, 05:27)jurialmunkey Wrote: [ -> ]It can be done but is dependent on the user having enabled that setting. Ive been hesitant to allow skins to override that setting forcibly as it can cause problems/slow-downs for users with very large libraries.

You could use a variable though to check if the user has that setting enabled and only apply the filter if they do e.g.
Code:
<value condition="Addon.SettingBool(plugin.video.themoviedb.helper,local_db)">

In terms of filtering by DBID it's as simple as adding:
Code:
&amp;exclude_key=dbid&amp;exclude_value=is_empty

e.g. for Recommendations dialog, say you want Recommended movies but only ones in the library:
Code:
5000|info=recommendations&amp;exclude_key=dbid&amp;exclude_value=is_empty|true|info

Also note that excluding simply removes items from the page which don't match so you will end up with fewer items (e.g. page of 20 but only 4 in library then list will only have 4 recommendations).

To help with that, you might want to extend the page length param to retrieve more pages (more pages = slower so that's the obvious downside).
e.g. to get 40 recs instead of normal 20 bump length to 2
Code:
5000|info=recommendations&amp;length=2&amp;exclude_key=dbid&amp;exclude_value=is_empty|true|info


Side note: You might also be interested in the filter dir functionality in SkinVariables which allows you to apply the same type of filtering to other plugins and library paths:
https://github.com/jurialmunkey/script.s...irectories

I probably have a decently large library but I also run Kodi on what most would consider a top of the line PC. Likely not the worst case scenario for this particular functionality, however, I have not noticed any issues at all Tongue

Does that setting being enabled also place the items with those in the library before those that are not?

That is what I currently notice and also use
xml:
<visible>!String.IsEmpty(ListItem.DBID)</visible>
to show an icon that it is in the library in the recommendations window. Does that visible only work when that setting is enabled?

Honestly, my main reason for wanting to switch to TMDbH is not only cause it is actively developed and maintained but I have wanted to be able to browse items using DialogVideoInfo and your script is the only one that does it perfectly.

In my mind I have two separate "workflows".
The first is inside DialogVideoInfo and that is local content only. The second is the Recommendations Dialog which is all content, local or not.

I wanted to use the add_path method since it opened info for the item directly. I originally thought it was just the videodb:// path cause that is what I saw in a test label so I used INFO[Container(xxx).FolderPath]$INFO[Container(xxx).ListItem.DBID] to replicate that but messing about with it further I realized that add_path=$INFO[ListItem.FolderPath], when the content is provided by TMDbH, is its own unique plugin path. I did see the other option using add_query= but that often brought up a select dialog to fine tune and since the item is in my library I figured it should already know what movie it was.

Not sure if all that made any sense but long story short I wanted to not have that search dialog pop up so that is what I have been trying to, unsuccessfully, accomplish for the past few days Laugh

I will definitely have to look further into SkinVariables. Someone just recently posted in my forum about wanting me to use it for what looks like the Viewtype Builder in the Wiki.

Thank you Smile
(2023-11-03, 07:55)mikeSiLVO Wrote: [ -> ]I probably have a decently large library but I also run Kodi on what most would consider a top of the line PC. Likely not the worst case scenario for this particular functionality, however, I have not noticed any issues at all Tongue

Yeah I'm in the same boat. Have a library of a bit under 500 movies and a couple of thousand tvshow episodes without any issues at all -- but I'm on an 11th gen nuc with an SSD for my system drive, so not exactly a low-powered use case!

I'm mostly basing it on reports from people on Android with massive massive libraries (many thousands of movies and tvshows)

(2023-11-03, 07:55)mikeSiLVO Wrote: [ -> ]Does that setting being enabled also place the items with those in the library before those that are not?

Depends on the list. For Recommendations/Similar and a Person's Credits, yes. For the others, no/

(2023-11-03, 07:55)mikeSiLVO Wrote: [ -> ]
xml:
<visible>!String.IsEmpty(ListItem.DBID)</visible>
to show an icon that it is in the library in the recommendations window. Does that visible only work when that setting is enabled?

Yep, DBID only retrieved if retrieving Kodi DB details. Finding the DBID is the main performance cost and only reason that its optional. Once we have DBID, it's trivial to get additional metadata from library.

Finding DBID is expensive because it involves filtering the library to try to find the item best matching available metadata (e.g. the title year etc.) -- it's like looking for a book in a library by walking the shelves searching for the title versus if you already know the dewey number and can go to the exact location.

(2023-11-03, 07:55)mikeSiLVO Wrote: [ -> ]I wanted to use the add_path method since it opened info for the item directly. I originally thought it was just the videodb:// path cause that is what I saw in a test label so I used INFO[Container(xxx).FolderPath]$INFO[Container(xxx).ListItem.DBID] to replicate that but messing about with it further I realized that add_path=$INFO[ListItem.FolderPath], when the content is provided by TMDbH, is its own unique plugin path. I did see the other option using add_query= but that often brought up a select dialog to fine tune and since the item is in my library I figured it should already know what movie it was.

You *can* use a videodb:// path with add_path= but you need to use some clever filtering so that you end up with a list that has a single item. Using FolderPath won't work well (I wish it did).

If you've got the TMDb ID already for the item, then you can reconstruct the TMDbH path. The path used is just:
Code:
plugin://plugin.video.themoviedb.helper/?info=details&tmdb_type={tmdb_type}&tmdb_id={tmdb_id}

Although this will obvious be an online item, not your local one.

I did do something similar in AH2 where I had a "local" only mode using add_path; and then an "online" mode using recs dialog. You can see how I did the filtering for add_path to use local items here:
https://github.com/jurialmunkey/skin.arc...ml#L93-L95

Also note that you can't mix this method with recommendations dialog. It's fine to use both of approaches in a skin, you just can't have both active at the same time because the two window managers will conflict.
Caveat before my post: I searched the forums and I found a few similar problems that I had months/years ago but it didn't solve my problem directly, including the last where jurial (who has made an amazing add-on as usual!) said there would be a fix...


I can't seem to update my library from the files/tv shows from tmdb helper. I successfully add the tv shows to my library, but they never update again. I have auto-update on, I even tried to force a full update, then update my tv show library and no new episodes appear even though it's weeks later (multiple new episodes have been added since). The only thing that works is removing the show from the plugin folder, then re-adding the show from the add-on, thus re-scraping all the seasons of the tv show again. Are there suggested settings that I'm missing? Is this something that's happening to others?

I'm on a nvidia shield, latest android tv. Thanks!
(2023-11-05, 04:37)truthlesshero Wrote: [ -> ]I can't seem to update my library from the files/tv shows from tmdb helper. I successfully add the tv shows to my library, but they never update again. I have auto-update on, I even tried to force a full update, then update my tv show library and no new episodes appear even though it's weeks later (multiple new episodes have been added since). The only thing that works is removing the show from the plugin folder, then re-adding the show from the add-on, thus re-scraping all the seasons of the tv show again. Are there suggested settings that I'm missing? Is this something that's happening to others?

How are you adding the tvshows?
Also what version of TMDbHelper are you using?

I dont seem to have any issues with new episodes not being added using most recent version on my repo.

My setup is:

1. On Trakt I've made a personal list called "Subscriptions".
2. Then I add that list to "TMDbHelper > Settings > Library > Auto-update library from Trakt list"
3. I've enabled "Auto-update library and add new/missing episodes" and "Update library after adding items".
4. Whenever I want to add another show, I simply add it to my Subscriptions list (either on Trakt website or via TMDbHelper context menu).

This approach has been rock-solid for me (at least I haven't noticed any issues). It's also really convenient because I can add shows to watch without even being at home -- e.g. a friend recommends something to watch on Netflix etc., so I just chuck it on my subscriptions list using my phone and then its there in my library when I get home after next library update.
(2023-11-05, 08:21)jurialmunkey Wrote: [ -> ]
(2023-11-05, 04:37)truthlesshero Wrote: [ -> ]I can't seem to update my library from the files/tv shows from tmdb helper. I successfully add the tv shows to my library, but they never update again. I have auto-update on, I even tried to force a full update, then update my tv show library and no new episodes appear even though it's weeks later (multiple new episodes have been added since). The only thing that works is removing the show from the plugin folder, then re-adding the show from the add-on, thus re-scraping all the seasons of the tv show again. Are there suggested settings that I'm missing? Is this something that's happening to others?

How are you adding the tvshows?
Also what version of TMDbHelper are you using?

I dont seem to have any issues with new episodes not being added using most recent version on my repo.

My setup is:

1. On Trakt I've made a personal list called "Subscriptions".
2. Then I add that list to "TMDbHelper > Settings > Library > Auto-update library from Trakt list"
3. I've enabled "Auto-update library and add new/missing episodes" and "Update library after adding items".
4. Whenever I want to add another show, I simply add it to my Subscriptions list (either on Trakt website or via TMDbHelper context menu).

This approach has been rock-solid for me (at least I haven't noticed any issues). It's also really convenient because I can add shows to watch without even being at home -- e.g. a friend recommends something to watch on Netflix etc., so I just chuck it on my subscriptions list using my phone and then its there in my library when I get home after next library update.

I added them by going to a trakt list and opening up the context menu and selecting add to library, then i update my library and it pops up but never updates. I have the auto update on, but not from trakt list.

I have the latest version of tmdb helper....but I think i'll do it your way to see if it works. If that's what i need to do, then that's an easy enough work around. I'll report back if this fixes it.