Add support for Windows Feature Experience Pack

This commit is contained in:
abbodi1406
2021-01-27 00:52:54 +03:00
parent 3aa89af281
commit 7ed939f0cc
4 changed files with 18 additions and 10 deletions

View File

@ -214,16 +214,19 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
}
$isCumulativeUpdate = 0;
if(preg_match('/\d{4}-\d{2}.+Update|Cumulative Update/i', $updateTitle)) {
if(preg_match('/\d{4}-\d{2}.+Update|Cumulative Update|Microsoft Edge|Windows Feature Experience Pack/i', $updateTitle)) {
$isCumulativeUpdate = 1;
$updateTitle = preg_replace('/ for .{3,5}-based systems| \(KB.*?\)/i', '', $updateTitle);
}
$updateTitle = preg_replace("/ ?\d{4}-\d{2}\w* ?| ?$foundArch ?| ?x64 ?/i", '', $updateTitle);
$updateTitle = preg_replace("/ ?\d{4}-\d{2}\D ?| ?$foundArch ?| ?x64 ?/i", '', $updateTitle);
if($foundType == 'server')
$updateTitle = str_replace('Windows 10', 'Windows Server', $updateTitle);
if($foundType == 'sedimentpack')
$updateTitle = $updateTitle.' - KB4023057';
if(!preg_match("/$foundBuild/i", $updateTitle))
$updateTitle = $updateTitle.' ('.$foundBuild.')';
@ -292,13 +295,14 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
$shaArray = array();
foreach($fileList[0] as $val) {
preg_match('/FileName=".*?"/', $val, $name);
$name = preg_replace('/FileName="|"$/', '', $name[0]);
if(preg_match('/.*_Diffs_.*|.*_Forward_CompDB_.*|\.cbsu\.cab$/i', $name)) continue;
preg_match('/Digest=".*?"/', $val, $sha1);
$sha1 = preg_replace('/Digest="|"$/', '', $sha1[0]);
$sha1 = bin2hex(base64_decode($sha1));
preg_match('/FileName=".*?"/', $val, $name);
$name = preg_replace('/FileName="|"$/', '', $name[0]);
preg_match('/Size=".*?"/', $val, $size);
$size = preg_replace('/Size="|"$/', '', $size[0]);