From 031ed7b130a3524fe7a36662b89e4d447349f589 Mon Sep 17 00:00:00 2001 From: happywillow0 <45346080+happywillow0@users.noreply.github.com> Date: Tue, 14 Jan 2020 07:35:33 -0500 Subject: [PATCH] Madara - Fix 1stkiss, Add TeabeerComics (#2066) Madara - Fix 1stkiss, Add TeabeerComics --- src/all/madara/build.gradle | 2 +- .../extension/all/madara/MadaraFactory.kt | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/all/madara/build.gradle b/src/all/madara/build.gradle index eb6b5df01..82123a8d2 100644 --- a/src/all/madara/build.gradle +++ b/src/all/madara/build.gradle @@ -5,7 +5,7 @@ ext { appName = 'Tachiyomi: Madara (multiple sources)' pkgNameSuffix = "all.madara" extClass = '.MadaraFactory' - extVersionCode = 44 + extVersionCode = 45 libVersion = '1.2' } diff --git a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt index 6e2e2c753..44b09b2d5 100644 --- a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt +++ b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt @@ -64,7 +64,8 @@ class MadaraFactory : SourceFactory { Toonily(), PlotTwistScan(), MangaKomi(), - Wakamics() + Wakamics(), + TeabeerComics() ) } @@ -137,15 +138,7 @@ class MangazukiClubKO : Madara("Mangazuki.club", "https://mangazuki.club/", "ko" class FirstKissManga : Madara("1st Kiss", "https://1stkissmanga.com/", "en", dateFormat = SimpleDateFormat("dd MMM yyyy", Locale.US)) { - override val pageListParseSelector = "div.reading-content img" - private val cdnUrl = "1stkissmanga.b-cdn.net" - override fun imageRequest(page: Page): Request { - val cdnHeaders = Headers.Builder().apply { - add("Referer", baseUrl) - add("Host", cdnUrl) - }.build() - return if (page.imageUrl!!.contains(cdnUrl)) GET(page.imageUrl!!, cdnHeaders) else GET(page.imageUrl!!, headers) - } + override fun headersBuilder(): Headers.Builder = super.headersBuilder().add("Referer", baseUrl) } class MangaSY : Madara("Manga SY", "https://www.mangasy.com/", "en") @@ -397,3 +390,5 @@ class MangaKomi : Madara("MangaKomi", "https://mangakomi.com", "en") class Wakamics : Madara("Wakamics", "https://wakamics.com", "en") +class TeabeerComics : Madara("Teabeer Comics", "https://teabeercomics.com/", "en") +