by Ricardo “Rudxain” Fernández Serrata
Version 5 (March 8, 2023)
Download (61 downloads)
Detects size of remote file before downloading, then shows progress by checking the size of the local file at regular intervals.
The reason why Delay is placed right after the "updater" fiber is forked, is to give enough time for AM (and 2nd HTTP request) to create the "Download/Automate/" directory (this is hacky, but reduces block-count), and to only check the size of local file after it has changed to a non-zero value.
This only works correctly if "Content-Length" metadata exists within the response header of the 1st HTTP request.
It's recommended to add a "catch failure" just before every HTTP request. In this situation, it's not necessary, because errors will be directly shown to the user.
Rate and review within the app in the Community section.