From 25e808b4285f447ba2d9f94c4c9b5ef6d5cf9fb6 Mon Sep 17 00:00:00 2001 From: matthuisman Date: Thu, 18 Apr 2024 14:28:46 +1200 Subject: Add System.Platform.WebOS conditional --- xbmc/GUIInfoManager.cpp | 10 ++++++++++ xbmc/guilib/guiinfo/GUIInfoLabels.h | 3 ++- xbmc/guilib/guiinfo/SystemGUIInfo.cpp | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 5a0c79d609..4a508418ef 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -1411,6 +1411,14 @@ const infomap weather[] = {{ "isfetched", WEATHER_IS_FETCHED }, /// @return **True** if Kodi is running on an android device. ///

/// } +/// \table_row3{ `System.Platform.WebOS`, +/// \anchor System_PlatformWebOS +/// _boolean_, +/// @return **True** if Kodi is running on a WebOS device. +///


+/// @skinning_v22 **[New Boolean Condition]** \link System_PlatformWebOS +/// `System.Platform.WebOS`\endlink

+/// } /// \table_row3{ `System.CanPowerDown`, /// \anchor System_CanPowerDown /// _boolean_, @@ -10561,6 +10569,8 @@ int CGUIInfoManager::TranslateSingleString(const std::string &strCondition, bool return SYSTEM_PLATFORM_DARWIN_TVOS; else if (platform == "android") return SYSTEM_PLATFORM_ANDROID; + else if (platform == "webos") + return SYSTEM_PLATFORM_WEBOS; } if (info[0].name == "musicplayer") { //! @todo these two don't allow duration(foo) and also don't allow more than this number of levels... diff --git a/xbmc/guilib/guiinfo/GUIInfoLabels.h b/xbmc/guilib/guiinfo/GUIInfoLabels.h index 68faf15e98..88897afcd8 100644 --- a/xbmc/guilib/guiinfo/GUIInfoLabels.h +++ b/xbmc/guilib/guiinfo/GUIInfoLabels.h @@ -483,7 +483,8 @@ #define SYSTEM_MEDIA_AUDIO_CD 754 #define SYSTEM_PLATFORM_DARWIN_TVOS 755 -#define SYSTEM_SUPPORTED_HDR_TYPES 756 +#define SYSTEM_SUPPORTED_HDR_TYPES 756 +#define SYSTEM_PLATFORM_WEBOS 757 #define SLIDESHOW_ISPAUSED 800 #define SLIDESHOW_ISRANDOM 801 diff --git a/xbmc/guilib/guiinfo/SystemGUIInfo.cpp b/xbmc/guilib/guiinfo/SystemGUIInfo.cpp index 70794125c4..fceb56bb7b 100644 --- a/xbmc/guilib/guiinfo/SystemGUIInfo.cpp +++ b/xbmc/guilib/guiinfo/SystemGUIInfo.cpp @@ -449,6 +449,13 @@ bool CSystemGUIInfo::GetBool(bool& value, const CGUIListItem *gitem, int context value = true; #else value = false; +#endif + return true; + case SYSTEM_PLATFORM_WEBOS: +#if defined(TARGET_WEBOS) + value = true; +#else + value = false; #endif return true; case SYSTEM_MEDIA_DVD: -- cgit v1.2.3