[RU] AllHentai. Fixed loading images (#5521)

This commit is contained in:
Blue cat 2021-01-23 18:07:30 +03:00 committed by GitHub
parent e7f03ed191
commit 23bb281e95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'AllHentai' extName = 'AllHentai'
pkgNameSuffix = 'ru.allhentai' pkgNameSuffix = 'ru.allhentai'
extClass = '.AllHentai' extClass = '.AllHentai'
extVersionCode = 1 extVersionCode = 2
libVersion = '1.2' libVersion = '1.2'
containsNsfw = true containsNsfw = true
} }

View File

@ -27,7 +27,7 @@ class AllHentai : ParsedHttpSource() {
override val name = "AllHentai" override val name = "AllHentai"
override val baseUrl = "http://allhentai.ru" override val baseUrl = "https://allhentai.ru"
override val lang = "ru" override val lang = "ru"
@ -205,6 +205,9 @@ class AllHentai : ParsedHttpSource() {
} else { } else {
if (urlParts[1].endsWith("/manga/")) { if (urlParts[1].endsWith("/manga/")) {
urlParts[0] + urlParts[2] urlParts[0] + urlParts[2]
} else if (urlParts[1].isEmpty()) {
val imageUrl = urlParts[2].split('?')
"https:" + urlParts[0] + imageUrl[0]
} else { } else {
urlParts[1] + urlParts[0] + urlParts[2] urlParts[1] + urlParts[0] + urlParts[2]
} }