diff options
author | Tobias Arrskog <topfs2@xbmc.org> | 2014-08-22 19:36:15 +0200 |
---|---|---|
committer | Tobias Arrskog <topfs2@xbmc.org> | 2014-08-22 19:36:15 +0200 |
commit | 1d56a78da567fbe5d7c4923de1c34a6f0825ed03 (patch) | |
tree | 57ba52dd9861ddf2407fb8d5f971f0d7f61b2e0e | |
parent | c19c9dd783d241b21bd51d1b79e9a6843ab392a5 (diff) | |
parent | 3b9d078cc9c3c84a1606ff752850d787f84aca43 (diff) |
Merge pull request #5259 from Montellese/jsonrpc_fix_app_version
JSON-RPC: fix detection of alpha build versions and add "tagversion" property
-rw-r--r-- | xbmc/interfaces/json-rpc/ApplicationOperations.cpp | 11 | ||||
-rw-r--r-- | xbmc/interfaces/json-rpc/schema/types.json | 3 | ||||
-rw-r--r-- | xbmc/interfaces/json-rpc/schema/version.txt | 2 |
3 files changed, 13 insertions, 3 deletions
diff --git a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp index 48117b9c1c..514e317ca5 100644 --- a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp +++ b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp @@ -124,12 +124,21 @@ JSONRPC_STATUS CApplicationOperations::GetPropertyValue(const std::string &prope result["minor"] = CCompileInfo::GetMinor(); result["revision"] = CCompileInfo::GetSCMID(); std::string tag = CCompileInfo::GetSuffix(); - if (StringUtils::EqualsNoCase(tag, "pre")) + if (StringUtils::StartsWithNoCase(tag, "alpha")) + { result["tag"] = "alpha"; + result["tagversion"] = StringUtils::Mid(tag, 5); + } else if (StringUtils::StartsWithNoCase(tag, "beta")) + { result["tag"] = "beta"; + result["tagversion"] = StringUtils::Mid(tag, 4); + } else if (StringUtils::StartsWithNoCase(tag, "rc")) + { result["tag"] = "releasecandidate"; + result["tagversion"] = StringUtils::Mid(tag, 2); + } else if (tag.empty()) result["tag"] = "stable"; else diff --git a/xbmc/interfaces/json-rpc/schema/types.json b/xbmc/interfaces/json-rpc/schema/types.json index 5b6f8f554b..8912630503 100644 --- a/xbmc/interfaces/json-rpc/schema/types.json +++ b/xbmc/interfaces/json-rpc/schema/types.json @@ -1420,7 +1420,8 @@ "major": { "type": "integer", "minimum": 0, "required": true }, "minor": { "type": "integer", "minimum": 0, "required": true }, "revision": { "type": [ "string", "integer" ] }, - "tag": { "type": "string", "enum": [ "prealpha", "alpha", "beta", "releasecandidate", "stable" ], "required": true } + "tag": { "type": "string", "enum": [ "prealpha", "alpha", "beta", "releasecandidate", "stable" ], "required": true }, + "tagversion": { "type": "string" } } } } diff --git a/xbmc/interfaces/json-rpc/schema/version.txt b/xbmc/interfaces/json-rpc/schema/version.txt index 1980a78f20..1b386a5470 100644 --- a/xbmc/interfaces/json-rpc/schema/version.txt +++ b/xbmc/interfaces/json-rpc/schema/version.txt @@ -1 +1 @@ -6.17.0 +6.18.0 |