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.
my mistake i thought i was on a community forum where ideas can and should be shared for the betterment of the community

i will not offer any further input to your project
(2023-03-24, 19:13)jepsizofye Wrote: [ -> ]my mistake i thought i was on a community forum where ideas can and should be shared for the betterment of the community

i will not offer any further input to your project

I'm not trying to be a dick or discourage contributions but the rate limits are important and not something I've implemented arbirtrarily.

If my API key suddenly starts excessively and repeatedly hitting these free services because of unlimited requests, then these free services will disable my API key. It's as simple as that. Then no one can use the plugin.

These services like TMDb and FanartTV provide their API data for free. TMDbHelper has over 100k daily unique users. Without limits, the request numbers start getting out of hand quickly. Even a small increase of 10 requests per user means TMDbHelper is generating an extra 1 million requests per day.

And I'm not saying these things as some hypothetical. It happened to marcelveldt with SkinHelper originally where some of his keys were disabled for exactly this reason and then he was forced to implement really strict rate limiting to get them back online. It's also the reason Trakt disabled artwork requests via their API in 2016.
(2023-03-24, 18:25)beatmasterrs Wrote: [ -> ]The creative common license logo is optional, if the license text is shown. But if i dont include an image control with id 9905, no wiki infos are shown?

The CC icon is optional in terms of Wikipedia's licensing requirements but the script itself still needs the image control 9905 ID to exist so that it doesn't raise an exception when generating the window.

If you don't want to display the CC icon, adding the image control but placing it offscreen or using a "<visible>false</visible>" tag should work.

(2023-03-24, 18:25)beatmasterrs Wrote: [ -> ]I've tried to use another color for the wiki links. When i set a skin string (the code example from the tmdbhelper wiki) e.g.

xml:

<onload>Skin.SetString(TMDbHelper.Wikipedia.Format.Link,{})</onload>

Your code looks correct for changing the link colour and works for me (despite the forum using the color tags rather than displaying it as part of the code! but I can see it when I quote it)

What version of TMDbHelper are you using? Note this feature is only available on Nexus 5.1.8+ which is currently not available in releases (you have to download the code directly from the nexus branch on github to use this feature) -- 5.1.8 will be released tomorrow as a proper release on my repo.

Also note that you must set the link colour skinstring *before* you open the scripted window. You can't change the colour after it is open.

(2023-03-24, 18:25)beatmasterrs Wrote: [ -> ]Do you already know when version 5 of your addon will be available in the official repo?

Been a bit busy with work lately but hopefully should be submitting it soon. The big feature with the module imports from MoojMidge was what I was waiting on to include and now that's in I'll be able to submit an update for Nexus. It's going to be a big change, so I'm not certain how long it will take for a review (last version update took more than 6 months after submitting to get it reviewed for official repo, so I've been a bit hesitant).
i get your reason @jurialmunkey 

i have more than 10k items in my collection, at 83 items a page thats 125 pages. and next week there will be more.

-----

Image

no worries though ive worked out my own api key as suggested
(2023-03-26, 03:49)jepsizofye Wrote: [ -> ]i get your reason @jurialmunkey 

i have more than 10k items in my collection, at 83 items a page thats 125 pages. and next week there will be more.

-----

Image

no worries though ive worked out my own api key as suggested
Please get api keys for tmdb and fanart TV as those are what provides the metadata and will be hit 100s of times by your changes. Trakt is a single request for the list and isn't affected.

Also there's no way you own 10000 items. Collections are for items you own.
with all these imposed limitations it seems ill just have to remove your addon and wish you well with it
@jurialmunkey 
I must be missing something here but... why the $INFO[Window(Home).Property(TMDbHelper.ListItem.PROPERTY)] return empty in MyVideoNav window?

I am using the TMDbHelper.Service method and all the properties are working fine in VideoInfo dialog and in Home window but not in video window.

I was away for some time from codding so i am pretty sure i am missing something here.

Cheers
Nessus
@nessus

It should work in myvideonav buts it's been a while since I used that method so I'll double check when I'm back home.

Check that you aren't accidentally setting a widget container ID property.
(2023-03-30, 01:12)jurialmunkey Wrote: [ -> ]Check that you aren't accidentally setting a widget container ID property.
Yep... that was the issue, but i am curious... why this was preventing the info properties to show in MyVideoNav?.
I thought the widget container ID property was required only for the widgets to work. Will i have a problem if I remove it?

 
(2023-03-30, 01:12)jurialmunkey Wrote: [ -> ]it's been a while since I used that method
What do you mean?. I thought the TMDbHelper.Service method was the best way to go. Or not?

Sorry for the repeatedly questions but like i said it's been a while and i am trying to keep up with things.

Cheers
Nessus
(2023-03-30, 06:30)nessus Wrote: [ -> ]Yep... that was the issue, but i am curious... why this was preventing the info properties to show in MyVideoNav?.
I thought the widget container ID property was required only for the widgets to work. Will i have a problem if I remove it?

TMDbHelper.WidgetContainer property tells TMDbHelper which container ID to do the lookups for (e.g. $INFO[Container(ID).ListItem.Title] etc.).

If WidgetContainer is clear then TMDbHelper uses the container ID of the current viewtype as per <views>. =
If WidgetContainer is set but that ID doesn't exist then there's nothing to lookup so properties are cleared.

In v5+ from my repo, there is now an additional setting you can toggle to make the property on a per window basis:
Skin.SetBool(TMDbHelper.UseLocalWidgetContainer)

Enabling that setting means instead of SetProperty(TMDbHelper.WidgetContainer,ID,Home) you can use SetProperty(TMDbHelper.WidgetContainer,ID) so that each Window has it's own separate WidgetContainer property.
 
(2023-03-30, 06:30)nessus Wrote: [ -> ]What do you mean?. I thought the TMDbHelper.Service method was the best way to go. Or not?

In v5+ there's now two different ways to use the Service. There's the classic property method you're using which outputs to Window(Home).Property(TMDbHelper.ListItem.PROPERTY)

Then there's the new Container Method:
https://github.com/jurialmunkey/plugin.v...ner-method

With the container method, instead of outputting details to Window Properties it sets an actual ListItem directly to a hidden container ID you specify. So for instance
Skin.SetString(TMDbHelper.MonitorContainer,99950)

You then create a hidden list in the background with id="99950" then TMDbHelper will add the details as a ListItem to that list so that you can reference it the normal way instead of window properties e.g.
$INFO[Container(99950).ListItem.Art(poster)]
$INFO[Container(99950).ListItem.Genre]
$INFO[Container(99950).ListItem.UniqueID(tmdb)]
$INFO[Container(99950).ListItem.Property(Genre.1.Name)] etc

Both approaches have advantages and disadvantages. The upside to the container method is that the infolabels match standard infolabel names and the transition between items when scrolling in a list is generally smoother and faster than window properties. The downside is that it needs a hidden container in each window/dialog, and transitions between windows/dialogs are bit janky because it needs to update each container for each window/dialog separately.

IF Window Properties works well for you, then there's no real reason to change - I plan on continuing to support both methods. The change was mostly because I needed something to handle blur/crop in a way where the transition between items in a list was cleaner and smoother.

(2023-03-30, 06:30)nessus Wrote: [ -> ]Sorry for the repeatedly questions but like i said it's been a while and i am trying to keep up with things.

No worries at all! Happy to explain.
@jurialmunkey brother when playing a movie or TV show through tmdbhelper using a video addon i don't get any clearart for the specific media but using my other video addons through tmdbhelper I do is there any unusual reason for this or is this normal for certain addon
(2023-03-30, 16:50)gemini88 Wrote: [ -> ]or is this normal

What would be normal, is that you, as a frequent Kodi forum visitor, should know by now that video add-ons that facilitate video piracy are NOT SUPPORTED in any way on this forum. In fact, you shouldn't even mention them unless you really want our attention.

Perhaps refreshing your knowledge on our forum rules (wiki) and subsequent piracy policy (wiki) is in order, brother.
@jurialmunkey 
Thank you for the full and detailed explanations. One last question..

So, if understand correctly... if i completely remove the SetProperty(TMDbHelper.WidgetContainer,WIDGET_ID,Home) from Startup window, i will still get the info properties in my home widgets container... correct?. Or is there any other way using the TMDbHelper.Service method to get the info properties in MyVideoNav and keep the TMDbHelper.WidgetContainer.ID property?
(2023-03-30, 13:48)jurialmunkey Wrote: [ -> ]If WidgetContainer is clear then TMDbHelper uses the container ID of the current viewtype as per <views>. =
If WidgetContainer is set but that ID doesn't exist then there's nothing to lookup so properties are cleared.

Are you planning to submit v5+ to the official repo any time soon?
(2023-03-30, 13:48)jurialmunkey Wrote: [ -> ]In v5+ from my repo, there is now an additional setting you can toggle to make the property on a per window basis:
Skin.SetBool(TMDbHelper.UseLocalWidgetContainer)

Cheers
Nessus
@Klojum sorry about that was so passionate about finding out the problem that I forgot just even mentioning those add-ons is forbidden sorry about that brother won't happen again G
(2023-03-30, 18:56)nessus Wrote: [ -> ]So, if understand correctly... if i completely remove the SetProperty(TMDbHelper.WidgetContainer,WIDGET_ID,Home) from Startup window, i will still get the info properties in my home widgets container... correct?. Or is there any other way using the TMDbHelper.Service method to get the info properties in MyVideoNav and keep the TMDbHelper.WidgetContainer.ID property?

There's a few ways you can do it and it really depends on the use case.

If you use a single ID for all your widgets then simply set it onload and clear onunload in Home.xml
xml:

<onload>SetProperty(TMDbHelper.WidgetContainer,WIDGET_ID,Home)</onload>
<onunload>ClearProperty(TMDbHelper.WidgetContainer,Home)</onunload>

Alternatively, the way I use it with multiple widgets is to set the property when the widget itself gains focus and then I use onunload in Home.xml to clear the property when leaving the home screen.
e.g.
xml:

<control type="list" id="301">
<onfocus>SetProperty(TMDbHelper.WidgetContainer,301,Home)</onfocus>
[...]
</control>
<control type="list" id="302">
<onfocus>SetProperty(TMDbHelper.WidgetContainer,302,Home)</onfocus>
[...]
</control>
etc.


(2023-03-30, 18:56)nessus Wrote: [ -> ]Are you planning to submit v5+ to the official repo any time soon?

Was actually planning to submit last month but hit a bit of a busy patch of work so will submit in a few weeks once I'm working less intense hours. Last time I submitted an update it took several months to get someone to review so I'm not sure how long it will take once I submit it though.