Move download link replacements

This commit is contained in:
eraseyourknees 2022-09-07 01:28:19 +02:00
parent 749fd65769
commit 6a524aa0c0
2 changed files with 12 additions and 1 deletions

View File

@ -329,7 +329,7 @@ function uupGetFiles(
$filesNew = array();
foreach($filesInfoKeys as $val) {
$filesNew[$val] = $filesInfoList[$val];
$filesNew[$val]['url'] = str_replace('http://tlu.dl.delivery.mp.microsoft.com', 'https://uupdump.sf.tlu.dl.delivery.mp.microsoft.com', $filesInfoList[$val]['url']);
$filesNew[$val]['url'] = uupApiFixDownloadLink($filesInfoList[$val]['url']);
}
$files = $filesNew;

View File

@ -155,3 +155,14 @@ function uupApiBuildMajor($build) {
return intval(explode('.', $build)[0]);
}
function uupApiFixDownloadLink($link) {
if($link == null)
return null;
return str_replace(
'http://tlu.dl.delivery.mp.microsoft.com',
'https://uupdump.sf.tlu.dl.delivery.mp.microsoft.com',
$link
);
}