Kodi Community Forum
Boolean conditions for skins to determine if it's a pvr build - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: Boolean conditions for skins to determine if it's a pvr build (/showthread.php?tid=125621)

Pages: 1 2 3


Boolean conditions for skins to determine if it's a pvr build - BigNoid - 2012-03-15

Is it possible to get a boolean for skins to use if the xbmc build is a pvr build. I want to use it to hide the livetv settings for regular xbmc builds while maintaining the pvr xml's in the skin.
I know I can use a skin setting for that, but imo that would make no sense to put it somewhere in the skinsettings to enable livetv.


RE: Boolean conditions for skins to determine if it's a pvr build - mad-max - 2012-03-16

+1 for this

Makes sense to me and would be a worthwile addition!

mad-max


RE: Boolean conditions for skins to determine if it's a pvr build - salora - 2012-03-16

maybe you can just add the option to activate livetv or not in the parameters?
like confluence or influence do


RE: Boolean conditions for skins to determine if it's a pvr build - BigNoid - 2012-03-16

Confluence has separate skins for pvr and non-pvr and can do this because it's delivered with the program build itself, something not yet possible for other skins because there's no separate pvr addon branch. I don't know influence, but if by parameters you mean skin settings I think I already explained myself in the first post for that.


RE: Boolean conditions for skins to determine if it's a pvr build - Hitcher - 2012-03-16

I used <visible>System.GetBool(pvrmanager.enabled)</visible> for XeeBo which has PVR in the main skin.


RE: Boolean conditions for skins to determine if it's a pvr build - BigNoid - 2012-03-16

(2012-03-16, 16:26)Hitcher Wrote: <visible>System.GetBool(pvrmanager.enabled)</visible>

Does not work to hide the settings, because that boolean is set in the settings for live tv Wink


RE: Boolean conditions for skins to determine if it's a pvr build - Jezz_X - 2012-03-16

Nothing will probably work unless it's also back ported to the main branch. Because the condition will always fail on the normal builds


RE: Boolean conditions for skins to determine if it's a pvr build - Hitcher - 2012-03-16

It fails thus it's not true and any PVR stuff remains hidden, no?


RE: Boolean conditions for skins to determine if it's a pvr build - BigNoid - 2012-03-16

It will generate a error in the normal builds, but will never return true, so it will do what we want. And as long as you don't use it as a visible condition, but only with conditional includes, the log won't be spammed with errors.


RE: Boolean conditions for skins to determine if it's a pvr build - jmarshall - 2012-03-16

I think we've well-lost the usefulness of the "error" in the log - your thoughts?


RE: Boolean conditions for skins to determine if it's a pvr build - BigNoid - 2012-03-17

Could be useful if you made a typo, but with PVR builds in mind I'd rather see it go. Then again, if there was a System.PVR in both pvr and normal builds we could use that instead of reading guisettings. All other pvr related settings are normally loaded in pvr xml's and are never loaded in regular builds, so no errors will be generated. In that case the error logging could stay.


RE: Boolean conditions for skins to determine if it's a pvr build - jmarshall - 2012-03-17

I'll make pvrmanager.enabled a valid setting in Eden (returning false, ofcourse). Sound good?


RE: Boolean conditions for skins to determine if it's a pvr build - BigNoid - 2012-03-17

That doesn't work to hide the LiveTV settings in regular builds (otherwise the settings will be hidden for everybody, because the setting to set pvrmanager.enabled to true is in the livetv settings), but could be useful for skins that have that as a visiblitiy condition in the home window.


RE: Boolean conditions for skins to determine if it's a pvr build - jmarshall - 2012-03-17

Right, you mean a settings category on the main settings screen - will discuss with opdenkamp.


RE: Boolean conditions for skins to determine if it's a pvr build - jmarshall - 2012-03-17

Ok, the setting pvrmanager.enabled will return false (and not spam the log) in Eden.

Also, system.haspvr is now available (infobool) in Eden for switching items off that don't belong.

6e91544 has the goodies.

Cheers,
Jonathan