From e079bf1f882a64c43d6bfea8f4bd05d7b603af4b Mon Sep 17 00:00:00 2001 From: Creepler13 Date: Sun, 16 Feb 2025 10:31:28 +0100 Subject: [PATCH] Philliascans change to madara (#7648) * Philliascans change to madara * Bump versionID * lint * Update src/en/philiascans/src/eu/kanade/tachiyomi/extension/en/philiascans/PhiliaScans.kt --------- Co-authored-by: Vetle Ledaal --- src/en/philiascans/build.gradle | 3 +- .../extension/en/philiascans/PhiliaScans.kt | 36 ++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/en/philiascans/build.gradle b/src/en/philiascans/build.gradle index 3f8db2ed3..5c0beabd5 100644 --- a/src/en/philiascans/build.gradle +++ b/src/en/philiascans/build.gradle @@ -1,7 +1,8 @@ ext { extName = 'Philia Scans' extClass = '.PhiliaScans' - themePkg = 'iken' + themePkg = 'madara' + baseUrl = "https://philiascans.org" overrideVersionCode = 0 isNsfw = false } diff --git a/src/en/philiascans/src/eu/kanade/tachiyomi/extension/en/philiascans/PhiliaScans.kt b/src/en/philiascans/src/eu/kanade/tachiyomi/extension/en/philiascans/PhiliaScans.kt index ae7d7a79d..d1c37f6b0 100644 --- a/src/en/philiascans/src/eu/kanade/tachiyomi/extension/en/philiascans/PhiliaScans.kt +++ b/src/en/philiascans/src/eu/kanade/tachiyomi/extension/en/philiascans/PhiliaScans.kt @@ -1,9 +1,37 @@ package eu.kanade.tachiyomi.extension.en.philiascans -import eu.kanade.tachiyomi.multisrc.iken.Iken +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.GET +import okhttp3.HttpUrl.Companion.toHttpUrl +import okhttp3.Request +import java.text.SimpleDateFormat +import java.util.Locale -class PhiliaScans : Iken( +class PhiliaScans : Madara( "Philia Scans", - "en", "https://philiascans.org", -) + "en", + SimpleDateFormat("dd/MMM", Locale.US), +) { + override val versionId: Int = 2 + override val useNewChapterEndpoint = true + + override fun popularMangaRequest(page: Int): Request { + val url = baseUrl.toHttpUrl().newBuilder().apply { + addQueryParameter("post_type", "wp-manga") + addQueryParameter("m_orderby", "views") + }.build() + return GET(url, headers) + } + + override fun latestUpdatesRequest(page: Int): Request { + val url = baseUrl.toHttpUrl().newBuilder().apply { + addQueryParameter("post_type", "wp-manga") + addQueryParameter("m_orderby", "latest") + }.build() + return GET(url, headers) + } + + // needed to exclude paid chapters + override fun chapterListSelector(): String = """li.wp-manga-chapter:not(:has(a[href="#"]))""" +}