Skip to content

Commit

Permalink
jsonrpc: add "tagversion" property to Application.GetProperties' "ver…
Browse files Browse the repository at this point in the history
…sion" property
  • Loading branch information
Montellese committed Aug 22, 2014
1 parent f41af78 commit 3b9d078
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions xbmc/interfaces/json-rpc/ApplicationOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,20 @@ JSONRPC_STATUS CApplicationOperations::GetPropertyValue(const std::string &prope
result["revision"] = CCompileInfo::GetSCMID();
std::string tag = CCompileInfo::GetSuffix();
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
Expand Down
3 changes: 2 additions & 1 deletion xbmc/interfaces/json-rpc/schema/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion xbmc/interfaces/json-rpc/schema/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.17.0
6.18.0

0 comments on commit 3b9d078

Please sign in to comment.