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.
(2024-03-01, 13:39)vella9 Wrote: [ -> ]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?
How can there be a calendar for upcoming movies you're currently watching?
(2024-03-01, 13:59)Hitcher Wrote: [ -> ]
(2024-03-01, 13:39)vella9 Wrote: [ -> ]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?
How can there be a calendar for upcoming movies you're currently watching?
This is required for movies premiering within this fortnight. Case in point, I have Dune Part II in my watchlist which is premiering today. Thanks
In that case Movies > Upcoming.
(2024-03-01, 15:35)Hitcher Wrote: [ -> ]In that case Movies > Upcoming.
but this is not using my Trakt account movies calendar.

Closest I got to is "MovieDbHelper>Trakt>Movies Watchlist (Anticipated)" but since this is not fetching from Trakt Calendar, it is displaying all the movies I have in the Watchlist and not just those premiering this fortnight.
(2024-03-01, 17:23)vella9 Wrote: [ -> ]
(2024-03-01, 15:35)Hitcher Wrote: [ -> ]In that case Movies > Upcoming.
but this is not using my Trakt account movies calendar.

Closest I got to is "MovieDbHelper>Trakt>Movies Watchlist (Anticipated)" but since this is not fetching from Trakt Calendar, it is displaying all the movies I have in the Watchlist and not just those premiering this fortnight.

You can filter any list using days from todays date and an lt operator
https://github.com/jurialmunkey/plugin.v...parameters
(2024-02-12, 00:24)ashlar Wrote: [ -> ]
(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
Anyone that could offer some help? I am at a loss about what I could do. My internet connection works perfectly fine for everything else.

Is there somewhere where Kodi saves these certificates? Maybe it's a leftover for some reasons...
(2024-03-02, 20:56)ashlar Wrote: [ -> ]Is there somewhere where Kodi saves these certificates? Maybe it's a leftover for some reasons...

https://kodi.wiki/view/SSL_certificates

Quote:All other platforms
Kodi includes its own bundle of default trusted certificate authorities in the file system/certs/cacert.pem of the Kodi installation.

Copy the file to a new location
Add your certificate (in PEM format) to the end of the new file
Set the environment variable SSL_CERT_FILE to the location of that new file
This method is also usable on Linux if you do not want to change your system trust store.

so then one would think updating that file with the github file would be the way forward https://github.com/xbmc/xbmc/tree/master/system/certs

see if that helps
(2024-03-02, 21:15)izprtxqkft Wrote: [ -> ]
(2024-03-02, 20:56)ashlar Wrote: [ -> ]Is there somewhere where Kodi saves these certificates? Maybe it's a leftover for some reasons...

https://kodi.wiki/view/SSL_certificates
Quote:All other platforms
Kodi includes its own bundle of default trusted certificate authorities in the file system/certs/cacert.pem of the Kodi installation.

Copy the file to a new location
Add your certificate (in PEM format) to the end of the new file
Set the environment variable SSL_CERT_FILE to the location of that new file
This method is also usable on Linux if you do not want to change your system trust store.

so then one would think updating that file with the github file would be the way forward https://github.com/xbmc/xbmc/tree/master/system/certs

see if that helps
Unfortunately nothing changed. Same error.

Code:
2024-03-02 22:52:05.626 T:12552    info <general>: [plugin.video.themoviedb.helper]
                                                   ConnectionError:  HTTPSConnectionPool(host='webservice.fanart.tv', port=443): Max retries exceeded with url: /v3/movies/1047016?api_key=fcca59bee130b70db37ee43e63f8d6c1 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1136)')))
                                                   Suppressing retries for 30 seconds
(2024-03-02, 23:54)ashlar Wrote: [ -> ]Unfortunately nothing changed. Same error.

it's unlikely to help but it's possible to direct kodi to the cacerts with advancedsettings
https://kodi.wiki/view/Advancedsettings....k_settings
Code:
<network>
<catrustfile>filepath</catrustfile>        <!-- Added in v19- Allows specifying a custom SSL CA trust store bundle. e.g. special://masterprofile/cacerts.pem -->
</network>

barring that then i guess it would need "|verifypeer=false" appended to the url but that has to be done in the addon code
(2024-03-03, 00:44)izprtxqkft Wrote: [ -> ]
(2024-03-02, 23:54)ashlar Wrote: [ -> ]Unfortunately nothing changed. Same error.

it's unlikely to help but it's possible to direct kodi to the cacerts with advancedsettings
https://kodi.wiki/view/Advancedsettings....k_settings
 
Code:
<network>
<catrustfile>filepath</catrustfile>        <!-- Added in v19- Allows specifying a custom SSL CA trust store bundle. e.g. special://masterprofile/cacerts.pem -->
</network>

barring that then i guess it would need "|verifypeer=false" appended to the url but that has to be done in the addon code
Uninstalled TheMovieDB Helper. I don't know what I needed it for but it didn't complain about being needed by the skin I currently use. As such, I removed it and I hope to have eliminated the problem at its root.
(2024-03-04, 00:11)ashlar Wrote: [ -> ]Uninstalled TheMovieDB Helper.

i suppose any solution will do 👍
It was mentioned I should look into this to replace the scripts on my skin. In looking, there are lots of options clearly. I am wondering within all of that, is there a clear way to replace something like this without have to entirely retool the skin:  ? 

Code:

        <value condition="String.IsEqual(ListItem.DBType,movie)">RunScript(script.embuary.info,call=movie,dbid=$INFO[ListItem.DBID])</value>
        <value condition="String.IsEqual(ListItem.DBType,tvshow)">RunScript(script.embuary.info,call=tv,dbid=$INFO[ListItem.DBID])</value>

What I see in the conversion clearly, yours is a plugin vs this is a script and I'm still trying to sort out how I would handle something this simple before I even consider something more complicated since I was told that embuary is being abandoned.

So I figured I'd ask before I spend hours and hours trying to experiment. I see early on Mr.V was inquiring how to convert, I'm just curious if the evolution has gotten to the point where basic things like this can be managed which I convert the rest which will take a while to get sorted out without screwing my skin in the process.

Thanks for any info.
Chris
(2024-03-06, 14:37)kittmaster Wrote: [ -> ]It was mentioned I should look into this to replace the scripts on my skin. In looking, there are lots of options clearly. I am wondering within all of that, is there a clear way to replace something like this without have to entirely retool the skin:  ? 

Code:

        <value condition="String.IsEqual(ListItem.DBType,movie)">RunScript(script.embuary.info,call=movie,dbid=$INFO[ListItem.DBID])</value>
        <value condition="String.IsEqual(ListItem.DBType,tvshow)">RunScript(script.embuary.info,call=tv,dbid=$INFO[ListItem.DBID])</value>

There is no direct replacement because the plugin does not use scripted windows like embuary/extended info.

It uses the native info dialog to pull up information for online items, which gives both more flexibility and consistency in design.

The only scripted part is a window manager which manages the window history as you backtrack through the dialogs.

There is a page on the info dialog about how to implement a replacement for extended info
https://github.com/jurialmunkey/plugin.v...ended-Info

If you want to look up an online item and add it to the history you can use
https://github.com/jurialmunkey/plugin.v...o-for-item

Lookups support all the parameters listed here to help get a better match on the item
https://github.com/jurialmunkey/plugin.v...parameters
ok, so I set my TMDb Info button as:

Code:

                    <item id="101">
                        <description>TMDb Info</description>
                        <visible>Skin.HasSetting(VideoInfoTMDb)</visible>
                        <label></label>
                        <label2>$LOCALIZE[31351]</label2>
                        <onclick>Dialog.Close(all)</onclick>
                        <onclick>$VAR[VideoInfoTMDbVar]</onclick>
                    </item>

It drops to my Includes_InfoDialogs.xml

Code:

    <variable name="VideoInfoTMDbVar">
        <value condition="String.IsEqual(ListItem.DBType,movie)">RunScript(plugin.video.themoviedb.helper,add_path=$INFO[ListItem.FolderPath],call_auto=1190)</value>
        <!-- <value condition="String.IsEqual(ListItem.DBType,movie)">RunScript(script.embuary.info,call=movie,dbid=$INFO[ListItem.DBID])</value> -->
        <value condition="String.IsEqual(ListItem.DBType,tvshow)">RunScript(script.embuary.info,call=tv,dbid=$INFO[ListItem.DBID])</value>
    </variable>

I created a file called "Custom_1190_ExtendedInfo_v2.xml" with the following code from your repository as such:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<window type="window" id="1190">
    <defaultcontrol always="true">9999</defaultcontrol>
    <controls>
        <include>Global_Background</include>
        <include>Topbar</include>
        <control type="list" id="9999">
            <top>-1000</top>
            <left>-1000</left>
            <width>1</width>
            <height>1</height>
            <itemlayout />
            <focusedlayout />
            <content target="videos">$INFO[Window(Home).Property(TMDbHelper.Path.Current)]</content>
        </control>
        <control type="group">
            <visible>Container(9999).IsUpdating</visible>
            <visible>!Window.IsVisible(DialogVideoInfo.xml)</visible>
            <include>Dialog_Busy</include>
        </control>
    </controls>


    <control type="list" id="1190">
        <itemlayout/>
        <focusedlayout/>
        <content>plugin://plugin.video.themoviedb.helper/?info=details&type=movie&query=$INFO[ListItem.Title]</content>
    </control>
    <!-- <label>$INFO[Container(1190).ListItemAbsolute(0).Property(rottentomatoes_rating)]</label> -->
    <label>$INFO[Container(1190).ListItem.Title</label>

I click on my movie "the beekeeper" and click the button "TMDb Info", the screen fades out, but is all black, nothing else. It seems to be working right, because the debug is showing the screen has called the 1190 xml as shown:

Image

I was expecting to see the title of the movie. 

What did I do wrong here? If I can sort this, I can expand on it once I figure out the correct method.

Thx!
Chris
(2024-03-07, 05:58)kittmaster Wrote: [ -> ]I click on my movie "the beekeeper" and click the button "TMDb Info", the screen fades out, but is all black, nothing else.

the first thing that jumps out is you didn't close the <window> tag in Custom_1190_ExtendedInfo_v2.xml with a </window>

this may be useful to you - https://www.xmlvalidation.com/