Add support for channels, keep compatibility with rings, update readme

This commit is contained in:
abbodi1406
2020-07-15 05:07:06 +03:00
parent 4ee4df6226
commit 5a0938a8d0
4 changed files with 58 additions and 16 deletions

View File

@ -33,7 +33,7 @@ function uupFetchUpd(
$arch = strtolower($arch);
$ring = strtoupper($ring);
$flight = ucwords(strtolower($flight));
if($flight == 'Current') $flight = 'Active';
$flight = 'Active';
if($build == 'latest' || (!$build)) {
$builds = array('17134.1');
@ -56,11 +56,11 @@ function uupFetchUpd(
return array('error' => 'UNKNOWN_ARCH');
}
if(!($ring == 'WIF' || $ring == 'WIS' || $ring == 'RP' || $ring == 'RETAIL' || $ring == 'MSIT')) {
if(!($ring == 'DEV' || $ring == 'BETA' || $ring == 'RELEASEPREVIEW' || $ring == 'WIF' || $ring == 'WIS' || $ring == 'RP' || $ring == 'RETAIL' || $ring == 'MSIT')) {
return array('error' => 'UNKNOWN_RING');
}
if(!($flight == 'Skip' || $flight == 'Active')) {
if(!($flight == 'Mainline' || $flight == 'Active' || $flight == 'Skip')) {
return array('error' => 'UNKNOWN_FLIGHT');
}
@ -76,6 +76,10 @@ function uupFetchUpd(
return array('error' => 'ILLEGAL_MINOR');
}
if($ring == 'DEV') $ring = 'WIF';
if($ring == 'BETA') $ring = 'WIS';
if($ring == 'RELEASEPREVIEW') $ring = 'RP';
if($flight == 'Active' && $ring == 'RP') $flight = 'Current';
$build = '10.0.'.$build.'.'.$minor;