Release script.skinvariables - Construct skin variables and perform other skin functions
#31
Just as an update for anyone that wants to use this in Matrix, I've updated the repository so that there is a separate Matrix branch. You'll need to install the repository.jurialmunkey-1.4-matrix.zip package from the repository source.

Anyone with the repository installed in Leia should be able to continue as usual.
Reply
#32
@jurialmunkey

I am receiving an error with skin variables. I've attached my logfile hoping you may be able to tell me what's going on with it.

Logfile: https://paste.kodi.tv/epekagiwag.kodi

Thanks in advance.

Shedrock
Reply
#33
(2020-07-10, 19:36)shedrock Wrote: @jurialmunkey

I am receiving an error with skin variables. I've attached my logfile hoping you may be able to tell me what's going on with it.

Logfile: https://paste.kodi.tv/epekagiwag.kodi

Thanks in advance.

Shedrock

Indicates a missing or incorrectly configured skinvariables file when attempting to run the variable constructor.

Is this stock Amber or your own version? Because I can't see anything in stock Amber which would run the variable constructor. It only uses the view builder as far as I can tell and that's a separate module that doesn't run this code.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#34
(2020-07-11, 05:29)jurialmunkey Wrote:
(2020-07-10, 19:36)shedrock Wrote: @jurialmunkey

I am receiving an error with skin variables. I've attached my logfile hoping you may be able to tell me what's going on with it.

Logfile: https://paste.kodi.tv/epekagiwag.kodi

Thanks in advance.

Shedrock

Indicates a missing or incorrectly configured skinvariables file when attempting to run the variable constructor.

Is this stock Amber or your own version? Because I can't see anything in stock Amber which would run the variable constructor. It only uses the view builder as far as I can tell and that's a separate module that doesn't run this code.
This is stock Amber from @bsoriano. I think this happened probably after I created a new user profile, switched to the new profile using Aeon Nox SiLVO, and that's when I noticed the error. I also deleted the other profiles to see if it would resolves the issue, but it didn't. I could be wrong, but I am 100% certain I never got that error before creating another profile. I am going to check it tomorrow morning on my other LE setup and report back.

I did a fresh installation of LibreELEC 9.2.3, as well as on Windows. I still get this error whenever I go to programs and hit the "Run" button. I know it does work though because the Amber feature "New media views selector" definitely works. The problem is that, if I create a new user profile and then switch users, that's the first error message that pops up "Skin Variables Error - Check the log for more information".

Regards,

Shedrock
Reply
#35
(2020-07-11, 05:45)shedrock Wrote:
(2020-07-11, 05:29)jurialmunkey Wrote:
(2020-07-10, 19:36)shedrock Wrote: @jurialmunkey

I am receiving an error with skin variables. I've attached my logfile hoping you may be able to tell me what's going on with it.

Logfile: https://paste.kodi.tv/epekagiwag.kodi

Thanks in advance.

Shedrock

Indicates a missing or incorrectly configured skinvariables file when attempting to run the variable constructor.

Is this stock Amber or your own version? Because I can't see anything in stock Amber which would run the variable constructor. It only uses the view builder as far as I can tell and that's a separate module that doesn't run this code.
This is stock Amber from @bsoriano. I think this happened probably after I created a new user profile, switched to the new profile using Aeon Nox SiLVO, and that's when I noticed the error. I also deleted the other profiles to see if it would resolves the issue, but it didn't. I could be wrong, but I am 100% certain I never got that error before creating another profile. I am going to check it tomorrow morning on my other LE setup and report back.

I did a fresh installation of LibreELEC 9.2.3, as well as on Windows. I still get this error whenever I go to programs and hit the "Run" button. I know it does work though because the Amber feature "New media views selector" definitely works. The problem is that, if I create a new user profile and then switch users, that's the first error message that pops up "Skin Variables Error - Check the log for more information".

Regards,

Shedrock
Running from programs is going to error because that's essentially the same as running the variable constructor and there's no variable to make.

Interesting about profiles. Profiles always seem to cause problems so I never use them - I'll have a look and see if I can recreate because I think I might have an inkling of why it would happen for a profile.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#36
Quote:Running from programs is going to error because that's essentially the same as running the variable constructor and there's no variable to make.

I realized that afterwards. Big Grin
Quote:Interesting about profiles. Profiles always seem to cause problems so I never use them - I'll have a look and see if I can recreate because I think I might have an inkling of why it would happen for a profile.

Thank you @jurialmunkey. Much appreciated.

Regards,

Shedrock
Reply
#37
I wanted to post this in case anybody else was getting a "Skin Variables Error" every time you leave the skin settings or sometimes when pressing other random things within the skin:

Even though I had Skin Variables installed and it said it was using the most up to date version, I went into the Jurial Monkey repository, found the skin variables, and then downloaded the version there (which I guess overwrote the one I had). It gave some warning message or said it didn't work or something but it fixed my issue.

This happened to me in version of Matrix that just updated automatically on google play store. Lost my Aura which I'm sad about but hoping to get everything set up similar in Horizon!

Cheers and thanks jurialmonkey!
Reply
#38
(2021-02-25, 18:23)Crap Yeah Wrote: I wanted to post this in case anybody else was getting a "Skin Variables Error" every time you leave the skin settings or sometimes when pressing other random things within the skin:

Even though I had Skin Variables installed and it said it was using the most up to date version, I went into the Jurial Monkey repository, found the skin variables, and then downloaded the version there (which I guess overwrote the one I had). It gave some warning message or said it didn't work or something but it fixed my issue.

This happened to me in version of Matrix that just updated automatically on google play store. Lost my Aura which I'm sad about but hoping to get everything set up similar in Horizon!

Cheers and thanks jurialmonkey!

Thank you so much! I had the EXACT same issue here - my nVidia Shield just updated me to Matrix without asking, and I too had everything just how I liked it with Aura. I've just got it all OK again with Amber and the SkinVariables error was driving me mad. You've just saved me a lot of time - all fixed now :-)
Reply
#39
(2021-02-26, 09:18)LadyBananas Wrote:
(2021-02-25, 18:23)Crap Yeah Wrote: I wanted to post this in case anybody else was getting a "Skin Variables Error" every time you leave the skin settings or sometimes when pressing other random things within the skin:

Even though I had Skin Variables installed and it said it was using the most up to date version, I went into the Jurial Monkey repository, found the skin variables, and then downloaded the version there (which I guess overwrote the one I had). It gave some warning message or said it didn't work or something but it fixed my issue.

This happened to me in version of Matrix that just updated automatically on google play store. Lost my Aura which I'm sad about but hoping to get everything set up similar in Horizon!

Cheers and thanks jurialmonkey!

Thank you so much! I had the EXACT same issue here - my nVidia Shield just updated me to Matrix without asking, and I too had everything just how I liked it with Aura. I've just got it all OK again with Amber and the SkinVariables error was driving me mad. You've just saved me a lot of time - all fixed now :-)
You're very welcome! Glad I could do my small part. Kodi forums and reddit have saved me 10s of times over the years with random particular technical questions.
Reply
#40
@jurialmunkey Hi, I have a couple of quick question about building viewtypes

First question, what are all the _Include expressions for?

Code:
<expression name="Exp_View_50_Include">True</expression>

Next, why am I getting the following conditional checks:-

Code:
[[String.IsEmpty(Container.PluginName)] | [!String.IsEmpty(Container.PluginName)]]

Aren't these completely redundant and should always equate to True.

And finally how do I hide my view selector button if there is only one view for a given section? Is there a way to tell if the current container only has one view to select from?

Thanks
Reply
#41
@jurialmunkey  Next problem Sad

I'm trying to create different viewtype rules for genres depending on if the library is video or music, these are my rules:-

Code:
        "genres_video": {
            "rule": "[Container.Content(genres) + String.Contains(Container.FolderPath,videodb)]",
            "library": "530",
            "plugins": "50"
        },        
        "genres_music": {
            "rule": "[Container.Content(genres) + String.Contains(Container.FolderPath,musicdb)]",
            "viewtypes": ["50", "520"],
            "library": "520",
            "plugins": "50"
        },

And this is the resulting expressions:- https://paste.kodi.tv/azomefiyez

My resulting expression look ok but when I'm in the music library I'm unable to changes view type from the default 520 to 50

Any ideas?

Thanks
Reply
#42
@jurialmunkey Ok, so stripping it back to the bare minimum

skinviewtypes.json
json:
{
    "prefix": "Exp_View",
    "viewtypes": {
        "50": "List",
        "520": "Square Grid",
        "530": "Category"
    },
    "rules": {
        "genres": {
            "rule": "Container.Content(genres) + !Window.IsVisible(MyMusicNav.xml)",
            "viewtypes": ["530"],
            "library": "530"
        },        
        "genres-music": {
            "rule": "Container.Content(genres) + Window.IsVisible(MyMusicNav.xml)",
            "viewtypes": ["50", "520"],
            "library": "520"
        }
    }
}

Gives:-
xml:
<?xml version="1.0" encoding="UTF-8"?>
<includes>
<expression name="Exp_View_50">[False]</expression>
<expression name="Exp_View_520">[[Container.Content(genres) + Window.IsVisible(MyMusicNav.xml) + [[String.IsEmpty(Container.PluginName)] | [!String.IsEmpty(Container.PluginName)]]]]</expression>
<expression name="Exp_View_530">[[Container.Content(genres) + !Window.IsVisible(MyMusicNav.xml) + [[String.IsEmpty(Container.PluginName)] | [!String.IsEmpty(Container.PluginName)]]]]</expression>
</includes>

As you can see my view type 50 expression is completely missing it's conditions Sad

I should have the same conditions as view type 520.... Shouldn't it? I'm completely stumped.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

OK, so I added view type 50 to the first genres rule:-

json:
{
    "prefix": "Exp_View",
    "viewtypes": {
        "50": "List",
        "520": "Square Grid",
        "530": "Category"
    },
    "rules": {
        "genres": {
            "rule": "Container.Content(genres) + !Window.IsVisible(MyMusicNav.xml)",
            "viewtypes": ["50", "530"],
            "library": "530"
        },        
        "genres-music": {
            "rule": "Container.Content(genres) + Window.IsVisible(MyMusicNav.xml)",
            "viewtypes": ["50", "520"],
            "library": "520"
        }
    }
}

This now allows me to at least bring up the the view selector when in the music library, even though I don't want view 50 to be usable in the video library.

Now the problem is when I'm in the music library and select view 50 I get this:

xml:
<includes>
    <expression name="Exp_View_50">Container.Content(genres) + !Window.IsVisible(MyMusicNav.xml) + [String.IsEmpty(Container.PluginName) (wiki)]</expression>
    <expression name="Exp_View_520">[[Container.Content(genres) + Window.IsVisible(MyMusicNav.xml) + [[String.IsEmpty(Container.PluginName)] | [!String.IsEmpty(Container.PluginName)]]]]</expression>
    <expression name="Exp_View_530">Container.Content(genres) + !Window.IsVisible(MyMusicNav.xml) + [!String.IsEmpty(Container.PluginName) (wiki)]</expression>
</includes>

Clearly that view 50 expression is for the video library (!Window.IsVisible(MyMusicNav.xml)) and not the music library. This is driving me crazy  Confused
Reply
#43
Ok, sorry, fixed it..... User error of course  Blush

Didn't realise I need to pass the rule into the script when rebuilding:-

Code:
Runscript(script.skinvariables,action=buildviews,contentid=$INFO[Container.Content],pluginname=$INFO[Container.PluginName])

Works fine for all regular content, but has no knowledge of what genres-music is Sad

Code:
     <variable name="ViewModeSwitchVar">
        <value condition="String.IsEqual(Container.Content,genres) + Window.IsVisible(MyMusicNav.xml)">genres-music</value>
        <value condition="!String.IsEmpty(Container.Content)">$INFO[Container.Content]</value>
    </variable>

Code:
Runscript(script.skinvariables,action=buildviews,contentid=$VAR[ViewModeSwitchVar],pluginname=$INFO[Container.PluginName])

Is the way to do it, just in case somebody else runs in to the same issue Big Grin
Reply
#44
(2021-04-18, 10:42)roidy Wrote: @jurialmunkey Hi, I have a couple of quick question about building viewtypes

First question, what are all the _Include expressions for?

Code:
<expression name="Exp_View_50_Include">True</expression>

Next, why am I getting the following conditional checks:-

Code:
[[String.IsEmpty(Container.PluginName)] | [!String.IsEmpty(Container.PluginName)]]

Aren't these completely redundant and should always equate to True.

And finally how do I hide my view selector button if there is only one view for a given section? Is there a way to tell if the current container only has one view to select from?

Thanks

Sorry for the delayed response - been absolutely swamped with work the last few weeks.

Looks like you sorted out things for genres.

The includes expression is used if you want to conditionally include only the viewtypes being used. If you have a lot of viewtypes, loading them all can impact performance even if they aren't currently visible. The include conditions allow you to skip including views that are never in use (eg if the user never uses wall view theres no point including its code).

The redundant plugin name condition is just to do with how separate visibility conditions are built for plugins and the library. It's unusual for the condition to be like that though as usually you've selected a view.

To hide the button when only one view is available youd need to have a variable that checks all your rules. Not really something the script can do since it needs to be called first.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#45
at 44yo and only having done html way back in 2006, and recently coming back into kodi when it become matrix I feel i need python 3 for big big dummy's Book lol,
But none the less i'll play with it just for the fun of it no matter how many times I break it.
love your work JM, i got so confused originally thinking the where different coded skin versions just using the same look with the mod skin, now know they where your master works of art, and skins like AZ2 and your new AH are art, look forward to seeing how AH develops over time.
Reading through here looks like i want to look at python 3 code.
I feel with Age some brain cells have given up but anything like this feels like good brain exercise.
Reply

Logout Mark Read Team Forum Stats Members Help
script.skinvariables - Construct skin variables and perform other skin functions0