Fix incomplete downloads. Closes #264
This commit is contained in:
parent
19bf47b6d2
commit
877032a757
@ -188,6 +188,12 @@ abstract class Source(context: Context) : BaseSource() {
|
|||||||
|
|
||||||
open fun getImageProgressResponse(page: Page): Observable<Response> {
|
open fun getImageProgressResponse(page: Page): Observable<Response> {
|
||||||
return networkService.requestBodyProgress(imageRequest(page), page)
|
return networkService.requestBodyProgress(imageRequest(page), page)
|
||||||
|
.doOnNext {
|
||||||
|
if (!it.isSuccessful) {
|
||||||
|
it.body().close()
|
||||||
|
throw RuntimeException("Not a valid response")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun savePageList(chapterUrl: String, pages: List<Page>?) {
|
fun savePageList(chapterUrl: String, pages: List<Page>?) {
|
||||||
|
Loading…
Reference in New Issue
Block a user