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

So I cleaned the library, created a new trakt list, added the shows to the list. I went into the settings and set them up the same way you do, but nothing happens.

I went to the list itself in the menus of the add-on, context menu, and clicked add to library directly on the list. That didn't add the shows either.

I went further and it seems the add-on sees my lists but when I click to open them, it doesn't go anywhere. It just reloads the list page again (like the trakt lists I have).

I checked with another add-on and the other one sees my lists and I can also open them.

I cleared the cache, I logged out and logged back in and same thing. It sees the list name but I can't actually open the list.

Would that be why it's not updating?


Edit: got it to load! I need to set the list public for it to work here. Private works for the other add-on. As soon as I did, I went back into the settings and put the list again and it seems to be updating on first run. Let's hope that it can update regularly!
(2023-11-07, 04:02)truthlesshero Wrote: [ -> ]Edit: got it to load! I need to set the list public for it to work here. Private works for the other add-on. As soon as I did, I went back into the settings and put the list again and it seems to be updating on first run. Let's hope that it can update regularly!

Oh you're right. For some reason Trakt is giving a 401 unauthorised on private lists even though it's authorized. Really odd. I wonder if I've missed passing the authorisation token somewhere or if its an error on Trakt's end

EDIT: Yep, I messed up something on a recent update and missed an authorization condition. I was sure I'd had private lists working in the past!
Functionality to use private lists should be restored in v5.1.52 that I just pushed.
Any idea what is causing this error in my log/how to debug: 

2023-11-08 19:50:10.594 T:5132     info <general>: [plugin.video.themoviedb.helper]
                                                   HTTP Error Code: 405
                                                   Request: https://api.trakt.tv//users//lists//items

Should say I checked the authorisation but this looks to be request related with the 405 error
(2023-11-08, 22:08)jeffski10 Wrote: [ -> ]Any idea what is causing this error in my log/how to debug: 

2023-11-08 19:50:10.594 T:5132     info <general>: [plugin.video.themoviedb.helper]
                                                   HTTP Error Code: 405
                                                   Request: https://api.trakt.tv//users//lists//items

Should say I checked the authorisation but this looks to be request related with the 405 error

405 error is method not allowed. That path is invalid for the API endpoint.

As to why a valid path is not being constructed, it is impossible to tell without a full debug log.
Hi jurialmunkey,

When I check what add-ons have updates available, TMDB Helper comes up. I check what version I have, and it says 5.2.0~nexus however when I select to update it, I get the below error.

2023-11-09 11:11:56.553 T:3019    error <general>: CAddonInstallJob[plugin.video.themoviedb.helper]: The dependency on script.module.jurialmunkey version 0.1.13 could not be satisfied.
2023-11-09 11:12:08.275 T:3019    error <general>: CAddonInstallJob[plugin.video.themoviedb.helper]: The dependency on script.module.jurialmunkey version 0.1.13 could not be satisfied.

Thanks in advance
(2023-11-09, 03:22)jurialmunkey Wrote: [ -> ]
(2023-11-08, 22:08)jeffski10 Wrote: [ -> ]Any idea what is causing this error in my log/how to debug: 

2023-11-08 19:50:10.594 T:5132     info <general>: [plugin.video.themoviedb.helper]
                                                   HTTP Error Code: 405
                                                   Request: https://api.trakt.tv//users//lists//items

Should say I checked the authorisation but this looks to be request related with the 405 error

405 error is method not allowed. That path is invalid for the API endpoint.

As to why a valid path is not being constructed, it is impossible to tell without a full debug log.
I don't see anything in the log with the request path/payload. Enabled debug and curl logging and only see the above still. Is there a line in the code I can add a debug line to write out the payload to work this out?
(2023-11-09, 22:27)jeffski10 Wrote: [ -> ]
(2023-11-09, 03:22)jurialmunkey Wrote: [ -> ]
(2023-11-08, 22:08)jeffski10 Wrote: [ -> ]Any idea what is causing this error in my log/how to debug: 

2023-11-08 19:50:10.594 T:5132     info <general>: [plugin.video.themoviedb.helper]
                                                   HTTP Error Code: 405
                                                   Request: https://api.trakt.tv//users//lists//items

Should say I checked the authorisation but this looks to be request related with the 405 error

405 error is method not allowed. That path is invalid for the API endpoint.

As to why a valid path is not being constructed, it is impossible to tell without a full debug log.
I don't see anything in the log with the request path/payload. Enabled debug and curl logging and only see the above still. Is there a line in the code I can add a debug line to write out the payload to work this out?

The request path is literally in the error message
Request: https://api.trakt.tv//users//lists//items

This is not a valid url because username and listslug are missing. Again, I need a log to know why those are missing but you seem unwilling to provide one.
(2023-11-09, 18:17)junitodx Wrote: [ -> ]Hi jurialmunkey,

When I check what add-ons have updates available, TMDB Helper comes up. I check what version I have, and it says 5.2.0~nexus however when I select to update it, I get the below error.

2023-11-09 11:11:56.553 T:3019    error <general>: CAddonInstallJob[plugin.video.themoviedb.helper]: The dependency on script.module.jurialmunkey version 0.1.13 could not be satisfied.
2023-11-09 11:12:08.275 T:3019    error <general>: CAddonInstallJob[plugin.video.themoviedb.helper]: The dependency on script.module.jurialmunkey version 0.1.13 could not be satisfied.

Thanks in advance

Then update the module... The error literally has the issue listed. You do not have a high enough version of script.module.jurialmunkey installed. This module is available on my repo but you must enable the Kodi setting to allow official addons to update from other repos for it to install automatically.

If you do not want to enable that setting, then you must install it manually via zip.

Also, if you have previously installed it manually, then you must go to the module in the addon browser and choose versions and select the one from my repo to allow it to track updates from my repo again.
(2023-11-10, 07:19)jurialmunkey Wrote: [ -> ]This module is available on my repo but you must enable the Kodi setting to allow official addons to update from other repos for it to install automatically.

Thanks, I set this to allow, and everything updated automatically as expected.
https://privatebin.at/?6ffbe043710a52a5#...ZYiyu7bBvA

I wasn't unwilling - it doesn't show anything hence asking if there was something else to try to log.  Here is the debug log I just ran
(2023-11-10, 20:14)jeffski10 Wrote: [ -> ]https://privatebin.at/?6ffbe043710a52a5#...ZYiyu7bBvA

I wasn't unwilling - it doesn't show anything hence asking if there was something else to try to log.  Here is the debug log I just ran

Thanks, it does show something.

Specifically, it shows that the library tagger routine is running despite there being no monitored trakt lists.

This is a bug which I will fix in the next update.
Thanks again for all the info. I've been working on the add_path stuff and I can't seem to get it working. My DialogVideoInfo opens and is blank but AH2 works perfectly.

In the log it appears to be calling the exact same but it just doesn't work for me.

AH2
Code:
2023-11-14 16:22:32.092 T:21960 debug <general>: CPythonInvoker(345): add_path='"videodb://movies/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22Mission: Impossible - Rogue Nation%22%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D"'
2023-11-14 16:22:32.092 T:21960 debug <general>: CPythonInvoker(345): call_auto=1190

My Skin
Code:
2023-11-14 16:29:02.369 T:6504 debug <general>: CPythonInvoker(362): add_path='"videodb://movies/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22Mission: Impossible - Rogue Nation%22%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D"'
2023-11-14 16:29:02.369 T:6504 debug <general>: CPythonInvoker(362): call_auto=1111

The onclick I am using to replace this line:
Code:
<onclick>RunScript(plugin.video.themoviedb.helper,add_path='"videodb://movies/titles/?xsp=%7B%22order%22%3A%7B%22direction%22%3A%22ascending%22%2C%22ignorefolders%22%3A0%2C%22method%22%3A%22sorttitle%22%7D%2C%22rules%22%3A%7B%22and%22%3A%5B%7B%22field%22%3A%22title%22%2C%22operator%22%3A%22is%22%2C%22value%22%3A%5B%22$INFO[Container(90011).ListItem.Title]%22%5D%7D%5D%7D%2C%22type%22%3A%22movies%22%7D"',call_auto=1111)</onclick>

The only differences I can notice are that AH2 uses list 9999 in 1190 while I am using Skin.SetBool(TMDbHelper.DirectCallAuto) in 1111. AH2 also uses an alarmclock to wait a second before runscript but I tried that also.

I'm stumped and feel like I am missing something obvious. Any ideas?

Debug log

Thanks Smile
@mikeSiLVO

The DirectCallAuto method is incompatible with this add_path hack. That method will ONLY work with TMDbHelper paths and nothing else because it needs to pull the TMDb ID to retrieve the online information and construct a ListItem to pass directly to Kodi's Dialog API. There's no TMDb ID in a library path so there's nothing to make.

The reason the add_path hack works with the old method is because the old method has a list container it can add the path to rather than directly constructing a listitem.

If you look at the example window for the old method, you'll see it is basically just a list with a window property for the content path. For the most part, all the script is doing is dropping the new path into the window property, waiting for the list to load the new content, and then simulating pressing Action(Info) on the first item. It then runs a small background loop to monitor for the dialog/window closing to backtrack in the history or for new paths being added.
(2023-11-15, 04:15)jurialmunkey Wrote: [ -> ]@mikeSiLVO

The DirectCallAuto method is incompatible with this add_path hack. That method will ONLY work with TMDbHelper paths and nothing else because it needs to pull the TMDb ID to retrieve the online information and construct a ListItem to pass directly to Kodi's Dialog API. There's no TMDb ID in a library path so there's nothing to make.

The reason the add_path hack works with the old method is because the old method has a list container it can add the path to rather than directly constructing a listitem.

If you look at the example window for the old method, you'll see it is basically just a list with a window property for the content path. For the most part, all the script is doing is dropping the new path into the window property, waiting for the list to load the new content, and then simulating pressing Action(Info) on the first item. It then runs a small background loop to monitor for the dialog/window closing to backtrack in the history or for new paths being added.

Going back to the old method got it working.
I feel like a potato Eek I should have tried that but assumed DirectCallAuto was the same thing... Sad

Thank you! Smile
Hi @jurialmunkey

I saw that in the wiki there is no "EndTime" function, which is linked with "$INFO[ListItem.Duration]", if there is no "$INFO[ListItem.Duration]" you can use "$INFO[Window( Home).Property(TMDbHelper.ListItem.Duration]" but then to obtain the end duration of a movie it is not possible to connect "$INFO[Window(Home).Property(TMDbHelper.ListItem.Duration]" with "$INFO[ListItem.EndTime]", so I wonder if it is possible to create a function like: "$INFO[Window(Home).Property(TMDbHelper.ListItem.EndTime]" to be able to see the end of a movie also in the Kodi video library, when "$INFO[ListItem.Duration]" is missing.


Thank you so much for your constant work on this addon.