Fix incomplete downloads. Closes #264

This commit is contained in:
len 2016-04-20 17:10:10 +02:00
parent 19bf47b6d2
commit 877032a757

View File

@ -188,6 +188,12 @@ abstract class Source(context: Context) : BaseSource() {
open fun getImageProgressResponse(page: Page): Observable<Response> {
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>?) {