diff options
author | Wolfgang Schupp <w.schupp@a1.net> | 2024-04-26 08:09:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-26 08:09:34 +0200 |
commit | c52e76babc8fe6977bb3855d9ff40bdc0adcad3a (patch) | |
tree | 9181827741ab84e87da5d160ef7c0ecc9b6d8ad5 | |
parent | 78a7c39ffaff12fa1f83ab2159c6bb0eb14a3b2c (diff) | |
parent | 25e808b4285f447ba2d9f94c4c9b5ef6d5cf9fb6 (diff) | |
download | xbmc-c52e76babc8fe6977bb3855d9ff40bdc0adcad3a.tar.xz |
Merge pull request #25018 from matthuisman/add_webos_platform_conditional
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 bfad92a308..da1d7dc97b 100644 --- a/xbmc/guilib/guiinfo/SystemGUIInfo.cpp +++ b/xbmc/guilib/guiinfo/SystemGUIInfo.cpp @@ -452,6 +452,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; |