Kodi Community Forum

Full Version: skin helper service
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2016-02-10, 10:58)Angelinas Wrote: [ -> ]Script build wall images but they are colorful, not black&white....
Skin showing wall images with code $INFO[Window(Home).Property(BW_SkinHelper.AllMoviesBackground.Wall)] that isnt problem.Problem is script building wall Images B&W Smile

Can you test with latest Git ?
Please allow the script some time to recreate the wall images. After that you should have both colored and bw wall images provided...

Window(Home).Property(SkinHelper.AllMoviesBackground.Wall) --> color
Window(Home).Property(SkinHelper.AllMoviesBackground.Wall.BW) --> B&W
(2016-02-10, 13:30)marcelveldt Wrote: [ -> ]
(2016-02-08, 17:41)bsoriano Wrote: [ -> ]Hello Marcel,

Thank you for adding a Next Aired widget using the Next Aired Addon. However, the widget you added is for TV Shows, and not for Episodes. Would you consider adding a Next Aired episodes widget? This, in my opinion, is more useful than the TV shows one, so that you can have information about the episodes which are airing today from the TV shows. I would imagine that the episode (season and episode number, episode title) information is available via the addon, since it is shown when you run the addon.

Thanks for considering my request.

Regards,

Bart

The episode info is provided by the widget. You need to use the correct listitem properties to show that info.
For more info see the wiki from NextAired addon.

BTW: I am thinking about creating my own implementation of nextaired info through plugin listing as it is more flexible imo.
The current implementation parses the home properties of the nextaired info and converts it into a listitem listing.

Marcel, BobCratchett was kind enough to help me in showing the episode info in the widget info panel for MadNox, but I noticed something strange. The widget is listing yesterday's shows, not today's, and the episode info is for the episode from two weeks ago, not for the next episode. I have the latest version of the TV Show Next Aired addon, and the information is updated. Could this be perhaps because I have the addon configured to show the tv guide starting today and not the regular week? Thanks for your help.

Regards,

Bart
Hey Marcel ! Request inside Wink

You know I'm habituated to ask for weird things, so please sit down and take a breath Big Grin

You know that $VAR[] is not universal in KODI as for infolabels. That's something all of us had to face to at a moment.
My most needed cases are width / height / idletime, etc...
However, you also know that constants are working, so...

Is there a way (probably not but if I don't ask, I won't know) to launch a skin.helper action to set a value (like Skin.SetString) for a constant as SkinHelper.SetConstant and write / override it in a file (this is where you say no ?) having an <includes> structure ?

This way, we should include this file and use the constants set by user.

Let me know, cheers.
(2016-02-10, 19:43)marcelveldt Wrote: [ -> ]Can you test with latest Git ?
Please allow the script some time to recreate the wall images. After that you should have both colored and bw wall images provided...

Window(Home).Property(SkinHelper.AllMoviesBackground.Wall) --> color
Window(Home).Property(SkinHelper.AllMoviesBackground.Wall.BW) --> B&W
Just tested and of course you done miricle code again .....
TNX Working like charm...And you have good idea to create both wall images with number of creating images.

Image
(2016-02-10, 20:15)bsoriano Wrote: [ -> ]Marcel, BobCratchett was kind enough to help me in showing the episode info in the widget info panel for MadNox, but I noticed something strange. The widget is listing yesterday's shows, not today's, and the episode info is for the episode from two weeks ago, not for the next episode. I have the latest version of the TV Show Next Aired addon, and the information is updated. Could this be perhaps because I have the addon configured to show the tv guide starting today and not the regular week? Thanks for your help.

I guess you got a version from the cache. Make sure that you add the reload command to the plugin path:

plugin://script.skin.helper.service/?action=nextairedtvshows&amp;reload=$INFO[Window(Home).Property(widgetreload2)]
(2016-02-10, 20:16)Jayz2K Wrote: [ -> ]Is there a way (probably not but if I don't ask, I won't know) to launch a skin.helper action to set a value (like Skin.SetString) for a constant as SkinHelper.SetConstant and write / override it in a file (this is where you say no ?) having an <includes> structure ?
This way, we should include this file and use the constants set by user.

Great idea... but...

Python scripts are actually not supposed to write to skin xml files.
Skin shortcuts is the one big exception addon that may do this while still beiing in the official Kodi repo.

I'm open to this suggestion to have one more "generated" include XML file in which skinhelper may write includes but only if ronie agrees with it.

That said. I'm not sure this will actually work because you'll need a reloadskin if the xml is updated dynamically by the script.
Or maybe, just maybe it will work with the new conditional include for files that was added in Isengard or Jarvis.

Maybe just test by adding a condition file include in one your windows (not in the generic includes.xml), update the file, not reload the skin and see what happens ?
(2016-02-10, 20:30)marcelveldt Wrote: [ -> ]Great idea... but...

Python scripts are actually not supposed to write to skin xml files.
Skin shortcuts is the one big exception addon that may do this while still beiing in the official Kodi repo.

I'm open to this suggestion to have one more "generated" include XML file in which skinhelper may write includes but only if ronie agrees with it.

That said. I'm not sure this will actually work because you'll need a reloadskin if the xml is updated dynamically by the script.
Or maybe, just maybe it will work with the new conditional include for files that was added in Isengard or Jarvis.

Maybe just test by adding a condition file include in one your windows (not in the generic includes.xml), update the file, not reload the skin and see what happens ?

I knew you'd tell me about skinshortcuts exception Wink so what I didn't try is to call a file outside the skin's folder (meaning giving it a path), so using your addon_datas folder ?
Regarding the reloadskin, I don't think it's really an issue. IMO this has to be used in skinsettings.xml or custom windows, so applying a reloadskin at onunload is pretty easy. I can test the include trick and let you know.

EDIT : Just thought that the xml file could be written at script installation but remain empty of constants (only <includes> tags). That could avoid having to check if it's there or not.
Hi,

Does anyone know how I can insert a condition to check if an information is not available? From what I understand, the addon returns a value of "N/A" when something is not available. This is the visibility condition I have used in the context of Rotten Tomatoes Critics Consensus:

PHP Code:
<visible>StringCompare($INFO[Window(Home).Property(SkinHelper.RottenTomatoesConsensus)], N/A)</visible

But that doesn't seem to work. I'm guessing I've made a mistake somewhere in that line and would appreciate if someone can tell me where I've gone wrong.

Thanks! Wink
(2016-02-10, 21:53)Hustler1337 Wrote: [ -> ]But that doesn't seem to work. I'm guessing I've made a mistake somewhere in that line and would appreciate if someone can tell me where I've gone wrong.
this will work,visible condition..
Code:
    <item>
    <label>RT Consensus</label><!-- RT-->
    <label2>$INFO[Window(Home).Property(SkinHelper.RottenTomatoesConsensus)]</label2>
    <onclick>noop</onclick>
    <visible>!StringCompare(Window(Home).Property(SkinHelper.RottenTomatoesConsensus), N/A)</visible>
    </item>
@Hustler1337 :

Is it a copy / paste ? You have a space before N/A ... ?
Anyone got an example of Cast Details working and the code to do so? Just can't seem to get my dumb head around it and integrate it?

TIA,

Mike.
(2016-02-10, 22:14)Jayz2K Wrote: [ -> ]@Hustler1337 :

Is it a copy / paste ? You have a space before N/A ... ?
space is not importent $INFO[ ] is wrong
=======================================================================
@Mike_Doc
I integrate in MOD SkinAeonMQ6...Cast Details see on my Github...
Have on Home menu,and in Dialog for PVR , both working excelent,only this things avaliable
Label = Name of the actor
Label2 = Role Icon
Icon = Thumb of the actor


Image
(2016-02-10, 21:53)Hustler1337 Wrote: [ -> ]Does anyone know how I can insert a condition to check if an information is not available? From what I understand, the addon returns a value of "N/A" when something is not available. This is the visibility condition I have used in the context of Rotten Tomatoes Critics Consensus:

No, the window properties will be cleared (empty) is no info is available.
The N/A description for the rotten tomatoes comes from Rotten tomatoes (omdb) itself.
(2016-01-27, 17:56)marcelveldt Wrote: [ -> ]
(2016-01-27, 17:03)Mike_Doc Wrote: [ -> ]But I don't get any images, I attempted adding a fallback as per the readme to the end but I still didn't get the fallback?

Can you test it with the latest Git version ?
I fixed this a few days ago.

Hi Marcel,

Sorry for not getting back earlier, this does indeed work now.

Thanks Angelinas, figured it out in the end after checking your work and seeing what was wrong.

Thanks
(2016-02-10, 22:09)Angelinas Wrote: [ -> ]
(2016-02-10, 21:53)Hustler1337 Wrote: [ -> ]But that doesn't seem to work. I'm guessing I've made a mistake somewhere in that line and would appreciate if someone can tell me where I've gone wrong.
this will work,visible condition..
Code:
    <item>
    <label>RT Consensus</label><!-- RT-->
    <label2>$INFO[Window(Home).Property(SkinHelper.RottenTomatoesConsensus)]</label2>
    <onclick>noop</onclick>
    <visible>!StringCompare(Window(Home).Property(SkinHelper.RottenTomatoesConsensus), N/A)</visible>
    </item>

Thanks Angelinas, that worked perfectly. Now, I have another question: Is it possible to use StringCompare (or another bool condition) to find out whether the returned value is greater, less than or equal to another value?

So in the context of Rotten Tomatoes Rating, I'd like to set a visibility condition by finding out whether the rating is greater than "60". How can I achieve this?

I thought I'd try:

PHP Code:
<visible>StringCompare(Window(Home).Property(SkinHelper.RottenTomatoesRating), >60)</visible
but that failed as I thought.

Would appreciate any help. Thanks

EDIT: Didn't notice IntegerGreaterThan bool in the wiki. Ignore the above. Smile