Added mirror selector
Developing new Downloader under xyz.quaver.pupil.util.download
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@file:Suppress("UNUSED_VARIABLE")
|
||||
@file:Suppress("UNUSED_VARIABLE", "IncorrectScope")
|
||||
|
||||
package xyz.quaver.pupil
|
||||
|
||||
@@ -35,7 +35,7 @@ class ExampleUnitTest {
|
||||
|
||||
@Test
|
||||
fun test() {
|
||||
URL("https://github.om/tom5079/Pupil/releases/download/4.2-beta2-hotfix2/Pupil-v4.2-beta2-hotfix2.apk").download(
|
||||
URL("https://github.com/tom5079/Pupil/releases/download/4.2-beta2-hotfix2/Pupil-v4.2-beta2-hotfix2.apk").download(
|
||||
File(System.getenv("USERPROFILE"), "Pupil.apk")
|
||||
) { downloaded, fileSize ->
|
||||
println("%.1f%%".format(downloaded*100.0/fileSize))
|
||||
|
||||
Reference in New Issue
Block a user