WIP Embuary to TMDB Helper conversion
#31
(2024-07-01, 06:29)mikeSiLVO Wrote: Mocked up a basic recommendations dialog based on DialogVideoInfo.xml.

Latest commit in the tmdbh_test branch.

Well shit I guess I missed it by this much:

Me <--------------------------------------------------------------------------> Reality

Fundamentally I can see where this is going off the rails, I'm missing some key fundamentals:

xml:


<window type="dialog">
    <defaultcontrol always="true">9000</defaultcontrol>
    <controls>
        <control type="image">
            <include>FullScreenDimensions</include>
            <texture>special://skin/media/colors/black.png</texture>
        </control>


1st, Calling the thing as a dialog, no where in the example does it say to do so, but I guess that is implied as a skinner to have known that tidbit.
2nd, The way the example is written, the 9000 control, but makes sense as that is my default value for my dialogs, so no harm no foul there.
3rd, The FullScreenDimension, nope, would have never gotten that, haven't even noticed that in anything I've done thus far, learned something new today, thanks Mike.
4th, Texture, sure, makes sense, needs to to have a background, black for now, until I can match the rest of the skin to get it up and running etc etc....
5th, Carry on is the control setup, now that is clear "seeing" it working it makes sense, I can see how elements can be lifted from already working areas of the skin to speed it up.

I'm sure in a few years I'll be looking back looking at posts like this and laughing, but man, this tribal knowledge bullshit is frustrating.

Image

You are a great teacher Mike with a lot of patience and as I a Senior electrical engineer and former teacher myself at the college level, I know how frustrating people can make you because they just "don't get" and you just want to shake 'em and say.... "How the fuk do you not understand what I've taught you after all the xyz's and hand holding I've shown you?????"... so again I thank for your time and patience with me this stuff. It certainly leads to the mantra of learn something new everyday.

:)
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#32
I think you may be confusing the two XML files.

The background with id 1191 is a window and you can put stuff like a busy indicator there.

The script-tmdbhelper-recommendations.xml is a dialog in the example provided by jurial on the wiki:
xml:
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog">
<defaultcontrol always="true">6000</defaultcontrol>
<controls>
<control type="grouplist" id="6000">
<control type="list" id="5000">
<include>MyPosterListDefinition</include>
</control>
<control type="list" id="5001">
<include>MyPosterListDefinition</include>
</control>
</control>
</controls>
</window>

I know how hard it was for me to "get" skinning, a lot of trial and error was involved. The Skinning Manual was my lifeline. That and a reloadskin command after every little thing I changed.

I equate it to learning a new language and I still suck at Spanish even tho I took (failed) that class in high school... Laugh

My suggestion is to use the Madnox repo I made for us and clone that into your addons directory. Whenever you want to work on something make a new branch and start adding any changes, if things ever go tits up either reset the branch or switch back to master, delete the new branch you made, and make a new one.

You originally used this as the window background:
xml:
<!-- Background -->
<include content="BackgroundDefault">
<param name="imagepath">$VAR[VideoBackgroundVar]</param>
<param name="animatedfanart">Skin.HasSetting(VideoAnimatedFanart)</param>
</include>
That include leads to the images and controls that, for example, provide what appears behind the MyVideoNav.xml window like for views and stuff. I wanted to show a barebones example so I used a single image from that include just with a different texture and no visible tag:

xml:
<control type="image">
<include>FullScreenDimensions</include>
<texture colordiffuse="$VAR[BackgroundShadowColorVar]">panels/patterns/shadow.png</texture>
<visible>Skin.HasSetting(BackgroundShadow)</visible>
</control>

xml:
<include>FullScreenDimensions</include>

I have a similar include in my skin so I used that instead of adding the width and height tags.

xml:
<include name="FullScreenDimensions">
<width>1920</width>
<height>1080</height>
</include>

My kids and how annoying they can get have taught me patience, patience you would not believe Tongue
Reply
#33
I will read up on the differences on dialog vs window in this particular context because clearly it means something very different in Kodi land.

I am going to say something and preface it with this disclaimer of absolution of: "I mean absolutely no disrespect, negative connotation, or derogatory statements"..... but from the outside looking in, while the wiki is very comprehensive text wise, overall, it is and overall has been very unhelpful, on many topics (for me at least).

I realize it is completely community driven, voluntarily updated, and I think that mostly landed on Karellen shoulders since I know he does most of the updates, so again, absolutely no disrespect to him or anyone else who updates it...none... none whatsoever...I'm speaking about content absorption or availability itself from an inexperienced user perspective.

The reason I say that is this and it has been a trend I've seen in the forums, everyone is consistently told to use confluence skin to "learn" from etc. and ok, that makes sense, but you have to know what questions to ask before you start to dissect something or even know where to begin. When you see Kodi and you are like, I'd love to do that etc., and you when realize the learning curve... well, it can be, discouraging.... but the true crux of the matterHuh is this.... NEARLY THE ENTIRE WIKI IS TEXT BASED. Who in the hell is going to read that, understand that, and correlate what that even means in relation to confluence skin while trying to sort out VSCODE (or IDE of choice), syntax highlighting, data management, versioning, blah blah blah... unless your already in the biz... we already have our answer....very few and dwindling.

The problem with the skinning manual, and you're going to laugh (please laugh and loudly), there are no pictures! SHOW ME what is happening, the pictures that are there are for transitions or things that are fluff, or better yet, local videos of the topic at hand, nobody wants to drudge through wiki hundreds of lines of <left> blah </left> bs in text and have to correlation to what is happening in real time ON THE SCREEN, for example... label1 & label2 of what that even means, in Kodi land, and why. Something so stupid like the system information panel on label2, 3 lines of Kodi information, is like 30 xml lines of code to create a simple feedback to the user... it is maddening to try and swallow that and retain it...

These are not excuses in any way, not meant to in any way make anyone's hard work or efforts belittled, no way, it is just my I wanna be a skinner observation from the ground up warts and all. I know you folks hear lots of negative shit, a lot of it unwarranted, but you guys have a great platform, and I can see the forest for the trees, my problem is I'm barely crawling and I want to run like Hussain bolt and I'm pissed I can't because I'm a god in my world and a peasant in this one....so it is frustrating.

So please don't be upset or think less because of this post, it is simply an observation of the skinning manual, because I have many times gone to it, tried to see how to apply it, and walked away wanting and went to Google to see if I could find an example of what would match what I'm doing. I have multiple bookmarks dedicated to skin dev, between window ids, control ids, skinning manual, infolables, your GitHub, jurialmonkey's github and multiple others... 

As I'm a believer in being part of the solution when a perceived problem is detected and not just sit and complain about it, my thoughts would be at some point, when "I" better understand how some of these things work that I would create video tutorials (which clearly you see I like to do...LOL) that you guys could review and if they make sense, either YT them, local load, or host them where ever and link them from the wiki as part of enhancement to explain each submodule to actual "show" what each thing does. Many people learn leaps and bounds when they can visualize what is going on and I think that might help many people out because the work you've done with me certainly has proven that concept out. Something to think about for the future maybe.

Anyway, don't want this to seem like a cry baby fest, it isn't and certainly don't want anyone to look at me in a negative light, I plan to stick around and plan to help others once I can get my own head above water, so please understand it is all coming from the heart and not meant to be viewed any other way.

Thx for listening and again, your support.

Chris
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#34
I'm working on the "play" feature and I have some confusion as to why you created the variable the way you did:

xml:


    <variable name="TMDbHelperIDVar">
        <value condition="String.StartsWith(ListItem.IMDbNumber,tt)">imdb_id=$INFO[ListItem.IMDbNumber]</value>
        <value>tmdb_id=$INFO[ListItem.IMDbNumber]</value>
    </variable>


When play is pressed:

xml:


                    <item id="601">
                        <description>Play</description>
                        <label></label>
                        <label2>$LOCALIZE[208]</label2>
                        <onclick>RunPlugin(plugin://plugin.video.themoviedb.helper/?info=play&tmdb_id=$INFO[ListItem.Property(tmdb_id)]&type=movie)</onclick>
                    </item>


The log is showing an error where info is populated with play, tmdb_id is NULL, and type with movie causing it to fail.

I manually forced ID 348:

xml:


<onclick>RunPlugin(plugin://plugin.video.themoviedb.helper/?info=play&tmdb_id=348;type=movie)</onclick>


Then pressed play and Aliens 1979 started to play.

So what I don't get, your variable is converting and using the IMDB value of tt0078748 minus the tt and substituting it as the TMDB_ID value.... Why?

Either way, I plugged in to the overlay debugger for data confirmation:

xml:


            <control type="label">
                <height>60</height>
                <textcolor>FFFF0000</textcolor>
                <shadowcolor>FF000000</shadowcolor>
                <font>font13_bold</font>
                <label>$INFO[tmdb_id,[COLOR FF00FF00]TMDb ID - [/COLOR]]$INFO[tmdb_id, (TMDb ID=,)]</label>
            </control>


and it never populates, so for some reason, that is causing the error for the player not to play. This is just one of the long list item in that area I'm getting to work. I have the buttons in place, just trying to get the functionality going. The variable swap is making an assumption that I think is dangerous where it assumes both of those values are present and properly populated to pull the right movie to start playing. Is there something I'm missing here?
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#35
(2024-07-02, 04:38)kittmaster Wrote: So what I don't get, your variable is converting and using the IMDB value of tt0078748 minus the tt and substituting it as the TMDB_ID value.... Why?

It is not converting:
xml:
<value condition="String.StartsWith(ListItem.IMDbNumber,tt)">imdb_id=$INFO[ListItem.IMDbNumber]</value>

That says if ListItem.IMDbNumber starts with tt, use that value (imdb_id=) otherwise fallback to use tmdb_id=

Some people scrape libraries with TMDb id #'s others have IMDb. So if ListItem.IMDbNumber starts with tt then it is definitely an IMDb number so we should send the correct value to the plugin.

This is because the plugin requires the correct param for the search lookup.

(2024-07-02, 04:38)kittmaster Wrote: and it never populates, so for some reason, that is causing the error for the player not to play. This is just one of the long list item in that area I'm getting to work. I have the buttons in place, just trying to get the functionality going. The variable swap is making an assumption that I think is dangerous where it assumes both of those values are present and properly populated to pull the right movie to start playing. Is there something I'm missing here?

$INFO[ListItem.Property(tmdb_id)] is not something provided by Kodi, the TMDb Helper plugin provides it. The only way to get that info is to either run it like in the recommendations dialog, it should work while that is open, or if outside a dialog or window populated by TMDbH you need to use the service monitor (container or classic methods) to have that property filled.
Reply
#36
Spent 7 hours on this pile of shit, still can't get the id while in the recommended sub screen. I dunno. And that is just on one stupid action..... the play button, haven't even looked at anything else.... jesus christ.

Searched Google for anyone that even uses it in this way... nope..... no one, zero.

I thought I was just being a bitch about it, but for your viewing pleasure, the first link is this thread:

Image
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#37
If you push a branch to GitHub then I can check your code.

Also if you search for an exact string then ofc it's only gonna show the things that google's bot crawls through and matches explicitly.

If you want code examples then you can try searching GitHub but this is a niche topic and Kodi skinning isn't a mainstream thing like python development or things like that. Finding answers will be a tad more difficult than a google search away.
Reply
#38
uploaded as new branch....  play button in sub has been the hamster wheel.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#39
I'm not sure what is happening, quite a few things aren’t making sense in the branch you sent. I still see stuff we talked about earlier being very wrong and I don't see a play button anywhere.
It’s hard to review the changes you made cause the branch is based on Mr.V’s old one and not the one I updated.

If you can base it on the latest omega branch and only add the changes you want me to look over it would be most helpful Smile
Reply
#40
I think I may have screwed up in how to create a new branch, I did it via desktop, it keeps going to mr vee's when I say view on github.... errr... wtf.

So to short circuit this for now. I just zipped it and pushed it up the same way "for now".

https://github.com/MikeSiLVO/skin.madnox...madnox.zip

That is the entire skin as it appears on my local drive, maybe you can nuke whatever I just did yesterday and make the branch correctly and I'll clone it, or I'll try to do it again today. I'll keep plugging away at it. 

That was my first attempt at using desktop to try and do a branch > Grade: F-
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#41
I've tried six ways to Sunday, I can't get this recommended method to retrieve the simplest things, plot, poster, ratings, budget....

Is there an example anywhere in this world that can show me exactly how to do one of the simplest things, retrieve the plot of a movie and display it in a label?

I just want to see it in action, there is nothing on Github or anywhere else. I can't figure out the container it lives in because I just can't comprehend how this plugin pulls what and puts what where. 

I don't get how to have the plugin get the details and how to route it into the whatever container and retrieve it for the label.

What am I doing wrong here... ? Frustration level: 3000%

Includes_InfoDialogs.xml (TMDB Info button) EDITED: Updated to latest string usage
xml:


                        <onclick>RunScript(plugin.video.themoviedb.helper, recommendations=5000|info=ListItem.Property($INFO[ListItem.Plot])|true|info, window_id=1191,$VAR[TMDbHelperTypeVar], $VAR[TMDbHelperIDVar])</onclick>


script-tmdbhelper-recommendations.xml (Stripped this down to bare metal just to see how this works, I have other items actually working) EDIT: Updated code
xml:


<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog">
    <defaultcontrol always="true">6000</defaultcontrol>
    <controls>
        <control type="group">
                <control type="image">
                    <include>FullScreenDimensions</include>
                    <texture>special://skin/media/colors/black80.png</texture>
                </control>
                <control type="grouplist" id="6000">
                    <control type="group">
                        <control type="panel" id="5000">
                            <!-- Plot -->
                            <control type="textbox">
                                <top>644</top>
                                <bottom>125</bottom>
                                <label>$INFO[ListItem.Plot]</label>
                                <include>AutoScrollPlot</include>
                            </control>
                        </control>
                    </control>          
                </control>
        </control>
    </controls>
</window>


This is the error I'm getting, it seems that my script call is right and I'm getting the data back, but something about routing it to the textbox is not right. I mirrored some of the code from Silvo NoX and I thought it followed it pretty close. Any ideas?
xml:

2024-07-13 13:47:05.512 T:6716     info <general>: Loading skin file: D:\Appz\Kodi_Portables\Omega\portable_data\addons\skin.madnox\16x9\script-tmdbhelper-recommendations.xml, load type: LOAD_ON_GUI_INIT
2024-07-13 13:47:05.543 T:17808   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'Exception'>
                                                   Error Contents: info=ListItem.Property(Ex-UFC fighter Dalton takes a job as a bouncer at a Florida Keys roadhouse, only to discover that this paradise is not all it seems.) is not valid route
                                                   Traceback (most recent call last):
                                                     File "D:\Appz\Kodi_Portables\Omega\portable_data\addons\plugin.video.themoviedb.helper\resources\tmdbhelper\lib\window\recommendations.py", line 96, in onInit
                                                       _next_id, _listitems = self._build_next()
                                                     File "D:\Appz\Kodi_Portables\Omega\portable_data\addons\plugin.video.themoviedb.helper\resources\tmdbhelper\lib\window\recommendations.py", line 110, in _build_next
                                                       _listitems = self.build_list(_next_id)
                                                     File "D:\Appz\Kodi_Portables\Omega\portable_data\addons\plugin.video.themoviedb.helper\resources\tmdbhelper\lib\window\recommendations.py", line 219, in build_list
                                                       _listitems = self._get_items(path)
                                                     File "D:\Appz\Kodi_Portables\Omega\portable_data\addons\plugin.video.themoviedb.helper\resources\tmdbhelper\lib\window\recommendations.py", line 193, in _get_items
                                                       listitems = Router(-1, path).get_directory(items_only=True) or []
                                                     File "D:\Appz\Kodi_Portables\Omega\portable_data\addons\plugin.video.themoviedb.helper\resources\tmdbhelper\lib\items\router.py", line 34, in get_directory
                                                       container = get_container(self.params.get('info'))(self.handle, self.paramstring, **self.params)
                                                     File "D:\Appz\Kodi_Portables\Omega\portable_data\addons\plugin.video.themoviedb.helper\resources\tmdbhelper\lib\items\routes.py", line 31, in get_container
                                                       raise Exception(f'info={info} is not valid route')
                                                   Exception: info=ListItem.Property(Ex-UFC fighter Dalton takes a job as a bouncer at a Florida Keys roadhouse, only to discover that this paradise is not all it seems.) is not valid route
                                                   -->End of Python script error report<--
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#42
I posted in the plugin.video.themoviedb.helper thread:- https://forum.kodi.tv/showthread.php?tid...pid3204000
Reply
#43
(2024-07-14, 21:05)roidy Wrote: I posted in the plugin.video.themoviedb.helper thread:- https://forum.kodi.tv/showthread.php?tid...pid3204000

ty...left reply there also.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#44
(2024-07-14, 21:05)roidy Wrote: I posted in the plugin.video.themoviedb.helper thread:- https://forum.kodi.tv/showthread.php?tid...pid3204000

I am really close, wondering if you could have a look at a different issue that cropped up with container initialization. Thx.

Chris
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#45
I'll try, what's the issue?
Reply

Logout Mark Read Team Forum Stats Members Help
Embuary to TMDB Helper conversion0