Release script.skinvariables - Construct skin variables and perform other skin functions
#13
@bsoriano

On first run, the script locks each rule to the ID specified in "library" and "plugins" fields respectively. Each ID specified in the "viewtypes" field will be available to select. Replace the Viewmode switch button (id=2) with the script.skinvariables viewmode selector so that users can select a new view with the following onclick command:
Code:
Runscript(script.skinvariables,action=buildviews,contentid=$INFO[Container.Content],pluginname=$INFO[Container.PluginName]

If you're in the library and content is movies, that will display a dialog for the user to select from all the view IDs specified in the "viewtypes" field of the "movies" rule. For instance, if your movies rule has "viewtypes": ["50", "51", "52"] then the dialog displays the option to choose from 50, 51, 52 viewmodes.

When the user makes a choice, the script then rebuilds the includes file to reflect the new setup.

The viewmode selector uses DialogSelect.xml using the detailed list (id=6) if icons are specified and the simple list (id=3) if no icons are specified. You can check against !String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive)) if you want to specify a different layout for the viewmode selector.

For instance, in my movies rule the viewtypes specified are 52, 54, 55, 56, 57 which are Posters, Landscape, List, Banners, Big Banner respectively. So when the user clicks to change view for movies they see this dialog and then when they make a choice the includes file is rewritten to reflect their choice.

Image
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply


Messages In This Thread
RE: script.skinvariables - Construct multiple skin variables from a template. - by jurialmunkey - 2020-06-08, 03:00
Logout Mark Read Team Forum Stats Members Help
script.skinvariables - Construct skin variables and perform other skin functions0