commit
4a29784380
@ -17,15 +17,13 @@ limitations under the License.
|
||||
|
||||
class UupDumpCache {
|
||||
private $cacheFile;
|
||||
private $isCompressed;
|
||||
private $newCacheVersion = 1;
|
||||
|
||||
public function __construct($resource, $compressed = true) {
|
||||
public function __construct($resource, private $isCompressed = true) {
|
||||
$res = $resource."+cache_v".$this->newCacheVersion;
|
||||
$cacheHash = hash('sha256', strtolower($res));
|
||||
$ext = $compressed ? '.json.gz' : '.json';
|
||||
$ext = $isCompressed ? '.json.gz' : '.json';
|
||||
$this->cacheFile = 'cache/'.$cacheHash.$ext;
|
||||
$this->isCompressed = $compressed;
|
||||
}
|
||||
|
||||
public function getFileName() {
|
||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
function uupApiVersion() {
|
||||
return '1.34.0';
|
||||
return '1.35.0';
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__).'/auths.php';
|
||||
|
@ -34,7 +34,7 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type) {
|
||||
if($sku == 119) {
|
||||
$dvcFamily = 'Windows.Team';
|
||||
}
|
||||
if(in_array($sku, [7,8,12,13,79,80,120,145,146,147,148,159,160,406,407,408])) {
|
||||
if(uupApiIsServer($sku)) {
|
||||
$dvcFamily = 'Windows.Server';
|
||||
$insType = 'Server';
|
||||
$blockUpgrades = 1;
|
||||
@ -329,7 +329,7 @@ function composeFetchUpdRequest($device, $encData, $arch, $flight, $ring, $build
|
||||
$branch = branchFromBuild($build);
|
||||
|
||||
$mainProduct = 'Client.OS.rs2';
|
||||
if(in_array($sku, [7,8,12,13,79,80,120,145,146,147,148,159,160,406,407,408])) {
|
||||
if(uupApiIsServer($sku)) {
|
||||
$mainProduct = 'Server.OS';
|
||||
}
|
||||
/*/ Hololens
|
||||
|
@ -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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user