From 42b1091c0b73d69300fe6a68cb3bf7223bf2c8b2 Mon Sep 17 00:00:00 2001 From: orin Date: Thu, 9 May 2024 22:22:29 +0200 Subject: [PATCH] Save architecture used to fetch the build to fileinfo --- fetchupd.php | 1 + shared/main.php | 2 +- shared/requests.php | 10 +++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/fetchupd.php b/fetchupd.php index 30780bd..fd991ee 100644 --- a/fetchupd.php +++ b/fetchupd.php @@ -433,6 +433,7 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku $temp['flight'] = $flight; $temp['branch'] = $branch; $temp['arch'] = $foundArch; + $temp['fetchArch'] = $arch == 'all' ? 'amd64' : $arch; $temp['build'] = $foundBuild; $temp['checkBuild'] = $build; $temp['sku'] = $sku; diff --git a/shared/main.php b/shared/main.php index d0d7484..5ea7e9d 100644 --- a/shared/main.php +++ b/shared/main.php @@ -16,7 +16,7 @@ limitations under the License. */ function uupApiVersion() { - return '1.44.3'; + return '1.45.0'; } require_once dirname(__FILE__).'/auths.php'; diff --git a/shared/requests.php b/shared/requests.php index ba8d774..6423ee8 100644 --- a/shared/requests.php +++ b/shared/requests.php @@ -316,11 +316,19 @@ function composeFileGetRequest($updateId, $info, $rev = 1, $type = 'Production') $created = gmdate(DATE_W3C, $createdTime); $expires = gmdate(DATE_W3C, $expiresTime); + $arch = 'amd64'; + + if(isset($info['fetchArch'])) { + $arch = $info['fetchArch']; + } elseif(isset($info['arch'])) { + $arch = $info['arch']; + } + $deviceAttributes = composeDeviceAttributes( isset($info['flight']) ? $info['flight'] : 'Active', isset($info['ring']) ? $info['ring'] : 'RETAIL', isset($info['checkBuild']) ? $info['checkBuild'] : '10.0.19041.1', - isset($info['arch']) ? $info['arch'] : 'amd64', + $arch, isset($info['sku']) ? $info['sku'] : 48, $type, isset($info['flags']) ? $info['flags'] : [],