Question for system condition
#1
Hi,

Is anyone have an idea to use condition for a selected skin in settings ? Possible ?

I need a condition when this skin is selected, for this setting (in guisettings.xml) : <setting id="lookandfeel.skin">skin.estuary.modv2</setting>

For a specified language I use : String.Contains(System.Language,French) but for skin I have no idea.

Thanks.
 Estuary MOD V2 
Reply
#2
May could do something in python but a simple solution would be have a window property set when the skin is being used or even setbool or even a string, adding it to startup or onload of the home page. that way it I will be unique to your skin.

hopeful I understood what your asking
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#3
(2017-08-15, 00:51)smitchell6879 Wrote: May could do something in python but a simple solution would be have a window property set when the skin is being used or even setbool or even a string, adding it to startup or onload of the home page. that way it I will be unique to your skin.

hopeful I understood what your asking

Yes, I see but property or setbool doesn't do exactly what I want. I use scripts in my skin and this scripts is running in others skin too if user switch to my skin to another. I want to stop that because it return error in log for others skins.

See this post : https://forum.kodi.tv/showthread.php?tid...pid2632135
 Estuary MOD V2 
Reply
#4
If the script it yours then you can add something like



PHP Code:
skin=xbmcaddon.getString("CurrentSkin")
if 
skin == "Name of the skin you want":
    do 
something here
else:
   
pass 

https://codedocs.xyz/xbmc/xbmc/group__py...b4f36b1655

a link to the addon class for python.

What I have been using is Properties which can be set on startup, or anywhere else before running the script.

PHP Code:
home xbmcgui.Window(10000)
skinhome.getProperty("CurrentSkin")
if 
skin == "Name of the skin you want":
    do 
something here
else:
   
pass 

and that can be found here https://codedocs.xyz/xbmc/xbmc/group__py...c54469bada

Of course with both of these you will have to add the info into the skin as well so the script can check for it.
Reply
#5
(2017-08-15, 03:33)Noobie101 Wrote: If the script it yours then you can add something like



PHP Code:
skin=xbmcaddon.getString("CurrentSkin")
if 
skin == "Name of the skin you want":
    do 
something here
else:
   
pass 

https://codedocs.xyz/xbmc/xbmc/group__py...b4f36b1655

a link to the addon class for python.

What I have been using is Properties which can be set on startup, or anywhere else before running the script.

PHP Code:
home xbmcgui.Window(10000)
skinhome.getProperty("CurrentSkin")
if 
skin == "Name of the skin you want":
    do 
something here
else:
   
pass 

and that can be found here https://codedocs.xyz/xbmc/xbmc/group__py...c54469bada

Of course with both of these you will have to add the info into the skin as well so the script can check for it.

Thnaks for your reply, I try :

Code:
import xbmc
import sys
import xbmcaddon

skin=xbmcaddon.getString("CurrentSkin")
if skin == "Estuary MOD V2 (KODI 18)":
    xbmc.executebuiltin("ActivateWindow(1132)")
else:
   pass

and

Code:
import xbmc
import sys
import xbmcaddon

skin=xbmcaddon.getString("CurrentSkin")
if skin == "skin.estuary.modv2":
    xbmc.executebuiltin("ActivateWindow(1132)")
else:
   pass

But not working.
 Estuary MOD V2 
Reply
#6
(2017-08-15, 04:42)Guilouz Wrote:
(2017-08-15, 03:33)Noobie101 Wrote: If the script it yours then you can add something like



PHP Code:
skin=xbmcaddon.getString("CurrentSkin")
if 
skin == "Name of the skin you want":
    do 
something here
else:
   
pass 

https://codedocs.xyz/xbmc/xbmc/group__py...b4f36b1655

a link to the addon class for python.

What I have been using is Properties which can be set on startup, or anywhere else before running the script.

PHP Code:
home xbmcgui.Window(10000)
skinhome.getProperty("CurrentSkin")
if 
skin == "Name of the skin you want":
    do 
something here
else:
   
pass 

and that can be found here https://codedocs.xyz/xbmc/xbmc/group__py...c54469bada

Of course with both of these you will have to add the info into the skin as well so the script can check for it.

Thnaks for your reply, I try :

Code:
import xbmc
import sys
skin=xbmcaddon.getString("CurrentSkin")
if skin == "Estuary MOD V2 (KODI 18)":
    xbmc.executebuiltin("ActivateWindow(1132)")
else:
   pass

and

Code:
import xbmc
import sys

skin=xbmcaddon.getString("CurrentSkin")
if skin == "skin.estuary.modv2":
    xbmc.executebuiltin("ActivateWindow(1132)")
else:
   pass

But not working.


getString is not function I don't think.

In you skin somewhere before you call the script set the property

Code:
<onload>SetProperty(CurrentSkin,skin.estuary.modv2,home)</onload>

in your script

PHP Code:
home xbmcgui.Window(10000)
skin=home.getProperty("CurrentSkin")
if 
skin == "skin.estuary.modv2":
    
xbmc.executebuiltin("ActivateWindow(1132)")
else:
     
pass 

keep in mind if I remember right pass will skip everything else after being called.


That should work for you. Should

forgot to mention
PHP Code:
import xbmcgui 
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#7
(2017-08-15, 05:18)smitchell6879 Wrote:
(2017-08-15, 04:42)Guilouz Wrote:
(2017-08-15, 03:33)Noobie101 Wrote: If the script it yours then you can add something like



PHP Code:
skin=xbmcaddon.getString("CurrentSkin")
if 
skin == "Name of the skin you want":
    do 
something here
else:
   
pass 

https://codedocs.xyz/xbmc/xbmc/group__py...b4f36b1655

a link to the addon class for python.

What I have been using is Properties which can be set on startup, or anywhere else before running the script.

PHP Code:
home xbmcgui.Window(10000)
skinhome.getProperty("CurrentSkin")
if 
skin == "Name of the skin you want":
    do 
something here
else:
   
pass 

and that can be found here https://codedocs.xyz/xbmc/xbmc/group__py...c54469bada

Of course with both of these you will have to add the info into the skin as well so the script can check for it.

Thnaks for your reply, I try :

Code:
import xbmc
import sys
skin=xbmcaddon.getString("CurrentSkin")
if skin == "Estuary MOD V2 (KODI 18)":
    xbmc.executebuiltin("ActivateWindow(1132)")
else:
   pass

and

Code:
import xbmc
import sys

skin=xbmcaddon.getString("CurrentSkin")
if skin == "skin.estuary.modv2":
    xbmc.executebuiltin("ActivateWindow(1132)")
else:
   pass

But not working.


getString is not function I don't think.

In you skin somewhere before you call the script set the property

Code:
<onload>SetProperty(CurrentSkin,skin.estuary.modv2,home)</onload>

in your script

PHP Code:
home xbmcgui.Window(10000)
skin=home.getProperty("CurrentSkin")
if 
skin == "skin.estuary.modv2":
    
xbmc.executebuiltin("ActivateWindow(1132)")
else:
     
pass 

keep in mind if I remember right pass will skip everything else after being called.


That should work for you. Should

forgot to mention
PHP Code:
import xbmcgui 

Thanks, that's do the job.
 Estuary MOD V2 
Reply
#8
Good deal
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply

Logout Mark Read Team Forum Stats Members Help
Question for system condition0