From 03360a8a78169758a0e0a7440524a99fdd8bce21 Mon Sep 17 00:00:00 2001 From: OnlineDynamic Date: Mon, 9 Sep 2024 09:43:47 +0100 Subject: [PATCH 1/2] fix upgrade re-downloading a OS file already local --- www/about.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/www/about.php b/www/about.php index 6c11d5454..39c20d522 100644 --- a/www/about.php +++ b/www/about.php @@ -288,12 +288,20 @@ function UpgradeOS() { keepOptFPP = '&keepOptFPP=1'; } + //set os name (url for download) if (os in osAssetMap) { osName = osAssetMap[os].name; os = osAssetMap[os].url; } + + //override file location from git to local if already downloaded + if ($('#OSSelect option:selected').text().toLowerCase().indexOf('(download)') === -1) { + os = $('#OSSelect option:selected').text(); + osName = $('#OSSelect option:selected').text(); + } + if (confirm('Upgrade the OS using ' + osName + - '?\nThis can take a long time. It is also strongly recommended to run FPP backup first.')) { + '?\nThis can take a long time. It is also strongly recommended to run FPP backup first.' + os)) { var options = { id: "upgradeOSPopupStatus", From a43af6f78d850795086ad752ae7dd73a63914a0b Mon Sep 17 00:00:00 2001 From: OnlineDynamic Date: Mon, 9 Sep 2024 09:45:08 +0100 Subject: [PATCH 2/2] remove debug step --- www/about.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/about.php b/www/about.php index 39c20d522..4c9cf17ad 100644 --- a/www/about.php +++ b/www/about.php @@ -301,7 +301,7 @@ function UpgradeOS() { } if (confirm('Upgrade the OS using ' + osName + - '?\nThis can take a long time. It is also strongly recommended to run FPP backup first.' + os)) { + '?\nThis can take a long time. It is also strongly recommended to run FPP backup first.')) { var options = { id: "upgradeOSPopupStatus",