ssseasonnn / RxDownload

A multi-threaded download tool written with RxJava and Kotlin
Apache License 2.0
4.14k stars 612 forks source link

【bug】Demolist 点击几个下载 然后杀掉应用 进来后 没有下载进度 怎么获取下载进度 #320

Open BigBigDeBoy opened 4 years ago

wzhangmoumou commented 2 years ago

val tempFile = task.createTaskManager().file().tmp() if (tempFile.exists()) { val fileHeader = RangeTmpFile.FileHeader() val fileContent = RangeTmpFile.FileContent() tempFile.source().buffer().use { fileHeader.read(it) fileContent.read(it, fileHeader.totalSegments) } holder.tv_downloading_size.text = "${fileContent.downloadSize().formatDownloadSize()} / ${fileHeader.totalSize.formatDownloadSize()}" }

Teemo100 commented 2 years ago

邮件已收到,三日内拜读