[Ru]Libmanga. Fix empty content-length image (#7529)

This commit is contained in:
Pavka 2021-06-07 17:51:33 +03:00 committed by GitHub
parent 2bcf339805
commit fe5771b1e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MangaLib'
pkgNameSuffix = 'ru.libmanga'
extClass = '.LibManga'
extVersionCode = 51
extVersionCode = 52
libVersion = '1.2'
}

View File

@ -403,7 +403,7 @@ class LibManga : ConfigurableSource, HttpSource() {
private fun checkImage(url: String): Boolean {
val response = client.newCall(Request.Builder().url(url).head().headers(headers).build()).execute()
return response.isSuccessful && (response.header("Content-Length")?.toInt()!! > 320)
return response.isSuccessful && (response.header("content-length", "0")?.toInt()!! > 320)
}
override fun fetchImageUrl(page: Page): Observable<String> {