2015-10-07, 18:48
(2015-10-07, 08:55)BobCratchett Wrote: You could probably do something really hacky (and not at all secure) by overriding all actions in a menu.
Code:<override action="globaloverride" group="[menu id]">
<condition>StringCompare(Skin.String(password),[mysecretpassword])</condition>
</override>
<override action="globaloverride" group="[menu id]">
<condition>!StringCompare(Skin.String(password),[mysecretpassword])</condition>
<action>Skin.SetString(password)</action>
</override>
(remembering to replace [menu id] with the actual group name of the menu, and of course setting [mysecretpassword] to something).
Maybe even combine it with a AlarmClock to reset the skin string after a few seconds. However, it would be very easily by-passable, and would be user specific (unless your skin builds an additional menu just for non-family-friendly shortcuts).
To be done properly would need someone with skinning and python experience, and the interest in parental controls, to think through exactly what changes would be needed (and all the different scenarios, to ensure it would work well). I can't personally think of a good way this could be done.
Thanks dude about your comment and help!
about the easy ways to pass this, there is always be a way to hack things, but its not the point...
sometimes users have little kids (3-4-5 years old, that using kodi to watch kids show) - and we want to prevent for them to enter some menu that they shouldnt. they should not know how to read overrides.xml at that age :]
so small option like you offered, could be great.
However, I tried your code:
Code:
<override action="globaloverride" group="mainmenu">
<condition>StringCompare(Skin.String(mypassword),1234)</condition>
</override>
<override action="globaloverride" group="mainmenu">
<condition>!StringCompare(Skin.String(mypassword),1234)</condition>
<action>Skin.SetString(mypassword)</action>
</override>
http://pastebin.com/99PRQgKj
any way, I think users will want the option to assign the password to a spesific menu, that they will create.. so it can make a little problem define it in the overrides file before they created it...
I hope Marcel will take this Idea into the Helper script.
Thanks.