Add some helper functions

This commit is contained in:
eraseyourknees 2022-08-29 03:01:11 +02:00
parent 547aa1512a
commit 067f7f2937
2 changed files with 17 additions and 1 deletions

View File

@ -16,7 +16,7 @@ limitations under the License.
*/
function uupApiVersion() {
return '1.34.0';
return '1.35.0-dev';
}
require_once dirname(__FILE__).'/auths.php';

View File

@ -134,3 +134,19 @@ function uupApiCheckUpdateId($updateId) {
$updateId
);
}
function uupApiIsServer($skuId) {
$serverSkus = [
7, 8, 12, 13, 79, 80, 120, 145, 146,
147, 148, 159, 160, 406, 407, 408
];
return in_array($skuId, $serverSkus);
}
function uupApiBuildMajor($build) {
if(!str_contains($build, '.')) {
return intval($build);
}
return intval(explode('.', $build)[0]);
}