Release script.skinvariables - Construct skin variables and perform other skin functions
#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


Messages In This Thread
RE: script.skinvariables - Construct multiple skin variables from a template. - by roidy - 2021-04-18, 17:50
Logout Mark Read Team Forum Stats Members Help
script.skinvariables - Construct skin variables and perform other skin functions0