Kodi Community Forum

Full Version: System.Platform boolean condition for RPi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In order to make an add-on setting visible only when running on a Raspberry Pi, it would be useful to have a boolean condition to test for that platform.

There are currently System.Platform.Android and System.Platform.ATV2 booleans so it seems logical that there should be one for Raspberry Pi? Perhaps called System.Platform.RPi?

I appreciate that there may be good reasons not to have this, but if not I would happily make a pull request if I could get some pointers. At first glance it seems I would only need to touch GUIInfoManager.cpp and GUIInfoManager.h?

I see there are already TARGET_RASPBERRY_PI ifdefs in various places.
do a pr - adapt CGUIInfoManager::GetBool and CGUIInfoManager::TranslateSingleString - just see what is done for "SYSTEM_PLATFORM_ANDROID" ... this should do it...
Will do. Thanks for the info.

EDIT: Pull request 2973 submitted.