diff options
author | matthuisman <hi@matthuisman.nz> | 2024-04-18 14:28:46 +1200 |
---|---|---|
committer | matthuisman <hi@matthuisman.nz> | 2024-04-18 14:32:55 +1200 |
commit | 25e808b4285f447ba2d9f94c4c9b5ef6d5cf9fb6 (patch) | |
tree | 83d71c48e0a2b54b742bec7c8d32f344fbe9a215 | |
parent | f5128624a919f3198dd04fd909e6f7f3a3e7d0f2 (diff) | |
download | xbmc-25e808b4285f447ba2d9f94c4c9b5ef6d5cf9fb6.tar.xz |
Add System.Platform.WebOS conditional
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 10 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/GUIInfoLabels.h | 3 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/SystemGUIInfo.cpp | 7 |
3 files changed, 19 insertions, 1 deletions
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. /// <p> /// } +/// \table_row3{ <b>`System.Platform.WebOS`</b>, +/// \anchor System_PlatformWebOS +/// _boolean_, +/// @return **True** if Kodi is running on a WebOS device. +/// <p><hr> +/// @skinning_v22 **[New Boolean Condition]** \link System_PlatformWebOS +/// `System.Platform.WebOS`\endlink <p> +/// } /// \table_row3{ <b>`System.CanPowerDown`</b>, /// \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 @@ -451,6 +451,13 @@ bool CSystemGUIInfo::GetBool(bool& value, const CGUIListItem *gitem, int context 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: value = CServiceBroker::GetMediaManager().IsDiscInDrive(); return true; |