bump version, changelog, hide merged sources

This commit is contained in:
Rani Sargees 2020-02-15 00:28:48 -05:00 committed by Jobobby04
parent cc6c1b5641
commit df6cafd6d1
3 changed files with 9 additions and 6 deletions

View File

@ -152,7 +152,7 @@ class EHentai(override val id: Long,
throttleFunc()
val resp = client.newCall(exGet(baseUrl + url)).execute()
if (!resp.isSuccessful) error("HTTP error (${resp.code})!")
if (!resp.isSuccessful) break //error("HTTP error (${resp.code})!")
doc = resp.asJsoup()
val parentLink = doc!!.select("#gdd .gdt1").find { el ->

View File

@ -336,7 +336,7 @@ class Hitomi : HttpSource(), LewdSource<HitomiSearchMetadata, Document>, UrlImpo
}
override fun pageListRequest(chapter: SChapter): Request {
return GET("$LTN_BASE_URL/manga/${HitomiSearchMetadata.hlIdFromUrl(chapter.url)}.js")
return GET("$LTN_BASE_URL/galleries/${HitomiSearchMetadata.hlIdFromUrl(chapter.url)}.js")
}
/**
@ -363,10 +363,13 @@ class Hitomi : HttpSource(), LewdSource<HitomiSearchMetadata, Document>, UrlImpo
val str = response.body!!.string()
val json = jsonParser.parse(str.removePrefix("var galleryinfo ="))
return json.array.mapIndexed { index, jsonElement ->
val hash = jsonElement["hash"].string
val hashPath1 = hash.takeLast(1)
val hashPath2 = hash.takeLast(3).take(2)
Page(
index,
"",
"https://${subdomainFromGalleryId(hlId)}a.hitomi.la/manga/$hlId/${jsonElement["name"].string}"
"https://${subdomainFromGalleryId(hlId)}a.hitomi.la/webp/$hashPath1/$hashPath2/$hash.webp"
)
}
}

View File

@ -93,7 +93,7 @@ class HitomiSearchMetadata: RaisedSearchMetadata() {
const val BASE_URL = "https://hitomi.la"
fun hlIdFromUrl(url: String)
= url.split('/').last().substringBeforeLast('.')
= url.split('/').last().split('-').last().substringBeforeLast('.')
fun urlFromHlId(id: String)
= "$BASE_URL/galleries/$id.html"