Release script.skinvariables - Construct multiple skin variables from a template.
#16
(2020-06-08, 03:22)bsoriano Wrote: !String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive))

@jurialmunkey , it seems the latest version of the addon on GitHub is not setting the home window property at all.  It is always empty, so it is always showing up the simple select dialog without icons.  I tried using Arctic Horizon and the result is the same.  Could you please check this issue? Thanks.

Regards,

Bart
Reply
#17
(2020-06-08, 16:45)bsoriano Wrote:
(2020-06-08, 03:22)bsoriano Wrote: !String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive))

@jurialmunkey , it seems the latest version of the addon on GitHub is not setting the home window property at all.  It is always empty, so it is always showing up the simple select dialog without icons.  I tried using Arctic Horizon and the result is the same.  Could you please check this issue? Thanks.

Regards,

Bart

It's working fine for me on Leia.

I haven't changed the code for the viewtypes since I added the property, so there haven't been any changes to that part of the code in almost two weeks...
Reply
#18
(2020-06-09, 02:10)jurialmunkey Wrote:
(2020-06-08, 16:45)bsoriano Wrote:
(2020-06-08, 03:22)bsoriano Wrote: !String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive))

@jurialmunkey , it seems the latest version of the addon on GitHub is not setting the home window property at all.  It is always empty, so it is always showing up the simple select dialog without icons.  I tried using Arctic Horizon and the result is the same.  Could you please check this issue? Thanks.

Regards,

Bart 

It's working fine for me on Leia.

I haven't changed the code for the viewtypes since I added the property, so there haven't been any changes to that part of the code in almost two weeks... 
@jurialmunkey , using Arctic Horizon, if you change the view from the library, the dialog that comes up is the one with icons and the home window property is set.  However, if you use the "Customize Viewtypes" option from skin settings, then the home window property is not set and you get the select dialog without icons.  Like in this screenshot:

Image

I am using Leia 18.6 under Windows 10, and the versions of the addon and your skin were updated from your GitHub this morning.

I hope this can point you in the correct direction.  Thanks for your help.

Regards,

Bart
Reply
#19
(2020-06-09, 02:48)bsoriano Wrote:
(2020-06-09, 02:10)jurialmunkey Wrote:
(2020-06-08, 16:45)bsoriano Wrote: @jurialmunkey , it seems the latest version of the addon on GitHub is not setting the home window property at all.  It is always empty, so it is always showing up the simple select dialog without icons.  I tried using Arctic Horizon and the result is the same.  Could you please check this issue? Thanks.

Regards,

Bart 

It's working fine for me on Leia.

I haven't changed the code for the viewtypes since I added the property, so there haven't been any changes to that part of the code in almost two weeks... 
@jurialmunkey , using Arctic Horizon, if you change the view from the library, the dialog that comes up is the one with icons and the home window property is set.  However, if you use the "Customize Viewtypes" option from skin settings, then the home window property is not set and you get the select dialog without icons.  Like in this screenshot:

Image

I am using Leia 18.6 under Windows 10, and the versions of the addon and your skin were updated from your GitHub this morning.

I hope this can point you in the correct direction.  Thanks for your help.

Regards,

Bart
That's normal. It only displays icons and alternate layout in the viewtype selector.

Do you need to use an alternate layout for that section? I can add a property for that section also - I just didn't think an alt layout made sense there since it doesn't have icons or details.
Reply
#20
(2020-06-09, 11:20)jurialmunkey Wrote:
(2020-06-09, 02:48)bsoriano Wrote:
(2020-06-09, 02:10)jurialmunkey Wrote: It's working fine for me on Leia.

I haven't changed the code for the viewtypes since I added the property, so there haven't been any changes to that part of the code in almost two weeks... 
@jurialmunkey , using Arctic Horizon, if you change the view from the library, the dialog that comes up is the one with icons and the home window property is set.  However, if you use the "Customize Viewtypes" option from skin settings, then the home window property is not set and you get the select dialog without icons.  Like in this screenshot:

Image

I am using Leia 18.6 under Windows 10, and the versions of the addon and your skin were updated from your GitHub this morning.

I hope this can point you in the correct direction.  Thanks for your help.

Regards,

Bart
That's normal. It only displays icons and alternate layout in the viewtype selector.

Do you need to use an alternate layout for that section? I can add a property for that section also - I just didn't think an alt layout made sense there since it doesn't have icons or details.

@jurialmunkey, thanks for the explanation. There’s no need to add a property if no icons will be shown in that section. It is just that it is the first thing I was trying and it did not look like the view type selector.

Regards,

Bart
Reply
#21
@jurialmunkey , another question.  I want to make the use of skinvariables optional, meaning I will add a skin setting to use it or not.  However, I am not sure on how to go about setting up the visibility conditions for the view containers.  Initially I thought I could do something like this:


<visible>[[Skin.HasSetting(Enable.NewViewSelector) + $EXP[Exp_View_54] ] | !Skin.HasSetting(hide.lowlistview)]</visible>

(Soory for the extra space between the two ] after 54.  If I don't put the space, the forum puts (wiki) in the syntax block instead of the two ] )

That would be for Container 54, which is the one for my view Low List. 

The problem I am running into is that if I had not set that view for any content through script.skinvariables, then Exp_View_54 is just [], which, when used in the visibility condition, will break it, since Kodi cannot parse the boolean expression.   Would you consider initializing the expressions as "[false]" instead of "[]"? That way I think my visibility condition would work, and there would be no errors in the log from Kodi trying to parse a boolean expression with [] in it.

Or is there another way of doing this? I just want the user to have the choice
Reply
#22
(2020-06-09, 22:58)bsoriano Wrote: @jurialmunkey , another question.  I want to make the use of skinvariables optional, meaning I will add a skin setting to use it or not.  However, I am not sure on how to go about setting up the visibility conditions for the view containers.  Initially I thought I could do something like this:


<visible>[[Skin.HasSetting(Enable.NewViewSelector) + $EXP[Exp_View_54] ] | !Skin.HasSetting(hide.lowlistview)]</visible>

(Soory for the extra space between the two ] after 54.  If I don't put the space, the forum puts (wiki) in the syntax block instead of the two ] )

That would be for Container 54, which is the one for my view Low List. 

The problem I am running into is that if I had not set that view for any content through script.skinvariables, then Exp_View_54 is just [], which, when used in the visibility condition, will break it, since Kodi cannot parse the boolean expression.   Would you consider initializing the expressions as "[false]" instead of "[]"? That way I think my visibility condition would work, and there would be no errors in the log from Kodi trying to parse a boolean expression with [] in it.

Or is there another way of doing this? I just want the user to have the choice
Ah I didn't realise that kodi doesn't like an empty condition - yep shouldn't be too difficult to make it be false. I'll let you know once i add it
Reply
#23
@bsoriano - Okay latest version (0.1.9) will add an explicit "False" condition if it is empty.
Reply
#24
(2020-06-11, 10:22)jurialmunkey Wrote: @bsoriano - Okay latest version (0.1.9) will add an explicit "False" condition if it is empty.

@jurialmunkey, thanks! I will test that today. I saw on GitHub that your latest commit adds a condition to disable the view lock, how does that work?

Regards,

Bart
Reply
#25
@jurialmunkey , I have tested, but I have not been successful.  If I have anything else other than "$EXP[Exp_View_xx]" as the visibility condition for my view containers, then when I try to switch viewtypes, it will not work.  I tried with this:


[$EXP[Exp_View_54] + Skin.HasSetting(Enable.NewViewSelector)] | [!Skin.HasSetting(hide.lowlistview)]

And it did not work.  I tried other variations and they did not work either.  Is the addon checking anything in particular when the "Runscript(script.skinvariables,action=buildviews,contentid=$VAR[ViewModeSwitch],pluginname=$INFO[Container.PluginName])" command is run?  That is what I am using as an onclick to try to switch the views.  The variable is this:


<variable name="ViewModeSwitch">
        <value condition="!String.IsEmpty(Container.Content)">$INFO[Container.Content]</value>
        <value condition="Window.IsVisible(MyPVRRecordings.xml)">pvr-recordings</value>
        <value condition="Window.IsVisible(MyPVRTimers.xml)">pvr-timers</value>
        <value condition="Window.IsVisible(MyPVRSearch.xml)">pvr-search</value>
        <value>none</value>
    </variable>

I just can't figure it out.  Any ideas? Thanks for your help.

Regards,

Bart
Reply
#26
(2020-06-11, 15:20)bsoriano Wrote: I tried with this:

[$EXP[Exp_View_54] + Skin.HasSetting(Enable.NewViewSelector)] | [!Skin.HasSetting(hide.lowlistview)]

You also need to check that the "Enable.NewViewSelector" setting is not set in the second half of your condition - otherwise the view is always visible as long as "hide.lowlistview" is not set.

It needs to be:
[$EXP[Exp_View_54] + Skin.HasSetting(Enable.NewViewSelector)] | [!Skin.HasSetting(hide.lowlistview) + !Skin.HasSetting(Enable.NewViewSelector)]

(2020-06-11, 12:47)bsoriano Wrote: I saw on GitHub that your latest commit adds a condition to disable the view lock, how does that work?

It basically adds a condition like your "Enable.NewViewSelector" to the Expressions.

To the top of your json file you add
"condition": "Skin.HasSetting(Enable.NewViewSelector)",

That will basically construct conditions like so:
[Skin.HasSetting(Enable.NewViewSelector) + NORMALEXPRESSION] | [!Skin.HasSetting(Enable.NewViewSelector) + ALLOWEDRULES]

The "normalexpression" part will be the same as what the script normally makes. The "allowedrules" part will be any rule that has the viewtype ID specified in the rule's viewtype list. For instance, if in my script you normally permit the user to choose ID 54 for Container.Content(movies) and Container.Content(episodes) then the condition will look like this:
[Skin.HasSetting(Enable.NewViewSelector) + NORMALEXPRESSION] | [!Skin.HasSetting(Enable.NewViewSelector) + [Container.Content(movies) | Container.Content(episodes)]]

But that's not that much use to you if you also want to have the "hide.lowlistview" in the condition.
Reply
#27
(2020-06-12, 03:16)jurialmunkey Wrote:
(2020-06-11, 15:20)bsoriano Wrote: I tried with this:

[$EXP[Exp_View_54] + Skin.HasSetting(Enable.NewViewSelector)] | [!Skin.HasSetting(hide.lowlistview)]

You also need to check that the "Enable.NewViewSelector" setting is not set in the second half of your condition - otherwise the view is always visible as long as "hide.lowlistview" is not set.

It needs to be:
[$EXP[Exp_View_54] + Skin.HasSetting(Enable.NewViewSelector)] | [!Skin.HasSetting(hide.lowlistview) + !Skin.HasSetting(Enable.NewViewSelector)]
(2020-06-11, 12:47)bsoriano Wrote: I saw on GitHub that your latest commit adds a condition to disable the view lock, how does that work?

It basically adds a condition like your "Enable.NewViewSelector" to the Expressions.

To the top of your json file you add
"condition": "Skin.HasSetting(Enable.NewViewSelector)",

That will basically construct conditions like so:
[Skin.HasSetting(Enable.NewViewSelector) + NORMALEXPRESSION] | [!Skin.HasSetting(Enable.NewViewSelector) + ALLOWEDRULES]

The "normalexpression" part will be the same as what the script normally makes. The "allowedrules" part will be any rule that has the viewtype ID specified in the rule's viewtype list. For instance, if in my script you normally permit the user to choose ID 54 for Container.Content(movies) and Container.Content(episodes) then the condition will look like this:
[Skin.HasSetting(Enable.NewViewSelector) + NORMALEXPRESSION] | [!Skin.HasSetting(Enable.NewViewSelector) + [Container.Content(movies) | Container.Content(episodes)]]

But that's not that much use to you if you also want to have the "hide.lowlistview" in the condition.
@jurialmunkey , thank you so much! I appreciate your explanation and I apologize if I asked something that should have been obvious.  This works perfectly! Smile

Regards,

Bart
Reply
#28
@jurialmunkey , I already uploaded a version of Amber which integrates your addon for viewtype configuration/selection.  One of the first questions I got back is whether the view names can be localized, as well as the strings for the addon.  I understand that the strings can be localized (I will submit to you links to translations into French and Spanish in the next couple of days), but would it be possible to localize the view names? As in, provide in the json file some way for you to accept localized names for the views? Thanks for considering this request.

Regards,

Bart
Reply
#29
(2020-06-13, 19:09)bsoriano Wrote: @jurialmunkey , I already uploaded a version of Amber which integrates your addon for viewtype configuration/selection.  One of the first questions I got back is whether the view names can be localized, as well as the strings for the addon.  I understand that the strings can be localized (I will submit to you links to translations into French and Spanish in the next couple of days), but would it be possible to localize the view names? As in, provide in the json file some way for you to accept localized names for the views? Thanks for considering this request.

Regards,

Bart
Added.

Viewtype definitions should now accept a localized string e.g.

"viewtypes": {
"50": "$LOCALIZE[30001]",
"51": "$LOCALIZE[30002]"
}
Reply
#30
@jurialmunkey , thanks for the localization of view types, it works great.

Here is a link to the French and Spanish translations for the addon strings: https://1drv.ms/u/s!AlII29kkG6TFiPcmzK8B...w?e=IZBYfX

Regards,

Bart
Reply



Logout Mark Read Team Forum Stats Members Help
script.skinvariables - Construct multiple skin variables from a template.0
This forum uses Lukasz Tkacz MyBB addons.