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HSOH2;*adPRW847+
z_JA=T`D`LR^bcW}-?uDko8QQES+AKTWymv)`rmg9QAa|IFz&@a2_8L9d;facn%K(17ieX7|Z;VkV3LEa$)x{^j!EMMptSj=#G1{`DY3htb;-AlX+p>BANaxa+S!glRw?v-%ajNhAd;
ze6J%EfQ^a^!a*hf#swj{(*;bUW=1bH+0U!t)`^W6QUnR8zdu-UtibO+R~}I2ePJ59
zNb>YCzf)a+t0ZS*i91#AMW{oAO{OD949QFRdgP)YB_+iN{P1)LS5Y#YIlMUCAWC;<
zlW#DAm^*zPwLBUe4&5Dus++rQNd|uq;~jbnf7oOab95RDmUkw}d*M~To7@7Fh^E!R
zKSE_z$adR&*#z`Jr#YDZ4(YUk%_im^<4KBHYp9dW>|I(0wiXSRT=rZB@Y%5g_mQF+
z$H8lq5-=j~5J*lcwL(r_!h|Zc4)F-XtmP~Cc=yMDBLNTr^QX?G?iuaU3E6Y+2kXjN
zj1)=aCkm6V&d^(|6f;gPfhYU3%p@7GjtK0l@#($UnEsGX+^F0TOoohU5xoxl*5pC{
z(L(TQ5~mn#;AtKt2P!9zp>OeY9++EW={v)<0!fj_v~W5+NRb91zluWFZ)yC&gWa`>
zDk(9t(1e;f9)_-W_(l!%VLs6>?(|GaVFW%|#n3Hkcckb%DgY*&f+WrRO{tIdn=d_a
z@e;wFaLViWl@Zz>){V@02;)$fyT<8}*U;iI?cWh)Kb?6&tb4|r5G3*Kw@C4
qMq7LT75OIFXI div.gallery > a"
+
+ override fun popularMangaFromElement(element: Element) = SManga.create().apply {
+ setUrlWithoutDomain(element.attr("href"))
+ thumbnail_url = element.selectFirst("img")?.getImageUrl()
+ title = element.selectFirst("div.caption")!!.text()
+ }
+
+ override fun popularMangaNextPageSelector() = null
+
+ // =============================== Latest ===============================
+ override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/?page=$page", headers)
+
+ override fun latestUpdatesSelector() = "div.index-container:contains(new uploads) > div.gallery > a"
+
+ override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
+
+ override fun latestUpdatesNextPageSelector() = "section.pagination > a.last:not(.disabled)"
+
+ // =============================== Search ===============================
+ override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable {
+ return if (query.startsWith(PREFIX_SEARCH)) { // URL intent handler
+ val id = query.removePrefix(PREFIX_SEARCH)
+ client.newCall(GET("$baseUrl/g/$id"))
+ .asObservableSuccess()
+ .map(::searchMangaByIdParse)
+ } else {
+ super.fetchSearchManga(page, query, filters)
+ }
+ }
+
+ private fun searchMangaByIdParse(response: Response): MangasPage {
+ val details = mangaDetailsParse(response.use { it.asJsoup() })
+ return MangasPage(listOf(details), false)
+ }
+
+ override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
+ val url = "$baseUrl/search".toHttpUrl().newBuilder()
+ .addQueryParameter("q", query)
+ .addQueryParameter("page", page.toString())
+ .build()
+
+ return GET(url, headers)
+ }
+
+ override fun searchMangaSelector() = "div.index-container > div.gallery > a"
+
+ override fun searchMangaFromElement(element: Element) = popularMangaFromElement(element)
+
+ override fun searchMangaNextPageSelector() = latestUpdatesNextPageSelector()
+
+ // =========================== Manga Details ============================
+ override fun mangaDetailsParse(document: Document) = SManga.create().apply {
+ thumbnail_url = document.selectFirst("#cover > a > img")?.getImageUrl()
+
+ with(document.selectFirst("div#bigcontainer > div > div#info")!!) {
+ title = selectFirst("h1.title")!!.text()
+ artist = getInfo("Artists")
+ genre = getInfo("Tags")
+
+ description = buildString {
+ select(".title > span").eachText().joinToString("\n").also {
+ append("Full titles:\n$it\n")
+ }
+
+ getInfo("Groups")?.also { append("\nGroups: $it") }
+ getInfo("Languages")?.also { append("\nLanguages: $it") }
+ getInfo("Parodies")?.also { append("\nParodies: $it") }
+ getInfo("Pages")?.also { append("\nPages: $it") }
+ }
+ }
+
+ status = SManga.COMPLETED
+ update_strategy = UpdateStrategy.ONLY_FETCH_ONCE
+ }
+
+ private fun Element.getInfo(item: String) =
+ select("div.field-name:containsOwn($item) a.tag > span.name")
+ .eachText()
+ .takeUnless { it.isEmpty() }
+ ?.joinToString()
+
+ // ============================== Chapters ==============================
+ override fun fetchChapterList(manga: SManga): Observable> {
+ val chapter = SChapter.create().apply {
+ url = manga.url
+ name = "Chapter"
+ chapter_number = 1F
+ }
+
+ return Observable.just(listOf(chapter))
+ }
+
+ override fun chapterListSelector(): String {
+ throw UnsupportedOperationException()
+ }
+
+ override fun chapterFromElement(element: Element): SChapter {
+ throw UnsupportedOperationException()
+ }
+
+ // =============================== Pages ================================
+ override fun pageListParse(document: Document): List {
+ return document.select("div.thumbs a.gallerythumb > img").mapIndexed { index, item ->
+ val url = item.getImageUrl()
+ // Show original images instead of previews
+ val imageUrl = url.substringBeforeLast('/') + "/" + url.substringAfterLast('/').replace("t.", ".")
+ Page(index, "", imageUrl)
+ }
+ }
+
+ override fun imageUrlParse(document: Document): String {
+ throw UnsupportedOperationException()
+ }
+
+ // ============================= Utilities ==============================
+ private fun Element.getImageUrl() = absUrl("data-src").ifEmpty { absUrl("src") }
+
+ companion object {
+ const val PREFIX_SEARCH = "id:"
+ }
+}
diff --git a/src/all/hentaicafe/src/eu/kanade/tachiyomi/extension/all/hentaicafe/HentaiCafeUrlActivity.kt b/src/all/hentaicafe/src/eu/kanade/tachiyomi/extension/all/hentaicafe/HentaiCafeUrlActivity.kt
new file mode 100644
index 000000000..84011a91e
--- /dev/null
+++ b/src/all/hentaicafe/src/eu/kanade/tachiyomi/extension/all/hentaicafe/HentaiCafeUrlActivity.kt
@@ -0,0 +1,41 @@
+package eu.kanade.tachiyomi.extension.all.hentaicafe
+
+import android.app.Activity
+import android.content.ActivityNotFoundException
+import android.content.Intent
+import android.os.Bundle
+import android.util.Log
+import kotlin.system.exitProcess
+
+/**
+ * Springboard that accepts https://hentaicafe.xxx/g/ intents
+ * and redirects them to the main Tachiyomi process.
+ */
+class HentaiCafeUrlActivity : Activity() {
+
+ private val tag = javaClass.simpleName
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ val pathSegments = intent?.data?.pathSegments
+ if (pathSegments != null && pathSegments.size > 1) {
+ val item = pathSegments[1]
+ val mainIntent = Intent().apply {
+ action = "eu.kanade.tachiyomi.SEARCH"
+ putExtra("query", "${HentaiCafe.PREFIX_SEARCH}$item")
+ putExtra("filter", packageName)
+ }
+
+ try {
+ startActivity(mainIntent)
+ } catch (e: ActivityNotFoundException) {
+ Log.e(tag, e.toString())
+ }
+ } else {
+ Log.e(tag, "could not parse uri from intent $intent")
+ }
+
+ finish()
+ exitProcess(0)
+ }
+}