From 9fe54f6a5fa424e1240091e36a55dd1a534471a7 Mon Sep 17 00:00:00 2001 From: orin Date: Tue, 21 Nov 2023 01:20:59 +0100 Subject: [PATCH] Greatly improve the download experience --- get.php | 103 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 57 insertions(+), 46 deletions(-) diff --git a/get.php b/get.php index 403a577..a486d97 100644 --- a/get.php +++ b/get.php @@ -1,18 +1,9 @@ addFromString('files/convert_config_macos', $convertConfigLinux); $zip->addFile($currDir.'/misc/autodl_files/readme.unix.md', 'readme.unix.md'); $zip->addFile($currDir.'/misc/autodl_files/converter_multi', 'files/converter_multi'); - $zip->addFile($currDir.'/misc/autodl_files/depends_win.ps1', 'files/depends_win.ps1'); + $zip->addFile($currDir.'/misc/autodl_files/converter_windows', 'files/converter_windows'); + $zip->addFile($currDir.'/misc/autodl_files/get_aria2.ps1', 'files/get_aria2.ps1'); $zip->close(); if($virtualEditions) { @@ -359,20 +366,20 @@ function createAria2Package($url, $archiveName, $app = null) { $time = gmdate("Y-m-d H:i:s T", time()); $ariacmd = <</dev/null || { destDir="UUPs" tempScript="aria2_script.\$RANDOM.txt" -echo "Retrieving aria2 script..." -aria2c --no-conf --log-level=info --log="aria2_download.log" -o"\$tempScript" --allow-overwrite=true --auto-file-renaming=false "$url" +echo "Retrieving aria2 script for the UUP set..." +aria2c --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -o"\$tempScript" --allow-overwrite=true --auto-file-renaming=false "$url" if [ $? != 0 ]; then echo "Failed to retrieve aria2 script" exit 1 @@ -504,7 +515,7 @@ if [ ! -z \$detectedError ]; then fi echo "" -echo "Attempting to download files..." +echo "Downloading the UUP set..." $ariabash if [ $? != 0 ]; then echo "We have encountered an error while downloading files." @@ -526,7 +537,7 @@ SCRIPT; $zip->addFromString('uup_download_linux.sh', $shellScript); $zip->addFromString('uup_download_macos.sh', $shellScript); $zip->addFile($currDir.'/misc/autodl_files/readme.unix.md', 'readme.unix.md'); - $zip->addFile($currDir.'/misc/autodl_files/depends_win.ps1', 'files/depends_win.ps1'); + $zip->addFile($currDir.'/misc/autodl_files/get_aria2.ps1', 'files/get_aria2.ps1'); $zip->close(); } else { echo 'Failed to create archive.';