-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reaper Scans (FR): Migrate theme (#5678)
- Loading branch information
1 parent
69aa93d
commit 1154da0
Showing
2 changed files
with
9 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
ext { | ||
extName = 'Reaper Scans' | ||
extClass = '.ReaperScans' | ||
themePkg = 'madara' | ||
baseUrl = 'https://reaperscans.fr' | ||
overrideVersionCode = 0 | ||
themePkg = 'keyoapp' | ||
baseUrl = 'https://reaper-scans.fr' | ||
overrideVersionCode = 4 | ||
} | ||
|
||
apply from: "$rootDir/common.gradle" |
31 changes: 6 additions & 25 deletions
31
src/fr/reaperscans/src/eu/kanade/tachiyomi/extension/fr/reaperscans/ReaperScans.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,15 @@ | ||
package eu.kanade.tachiyomi.extension.fr.reaperscans | ||
|
||
import eu.kanade.tachiyomi.multisrc.madara.Madara | ||
import eu.kanade.tachiyomi.source.model.SChapter | ||
import okhttp3.HttpUrl.Companion.toHttpUrl | ||
import org.jsoup.nodes.Element | ||
import java.text.SimpleDateFormat | ||
import java.util.Locale | ||
import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp | ||
|
||
class ReaperScans : Madara( | ||
class ReaperScans : Keyoapp( | ||
"Reaper Scans", | ||
"https://reaperscans.fr", | ||
"https://reaper-scans.fr", | ||
"fr", | ||
SimpleDateFormat("dd/MM/yyyy", Locale.US), | ||
) { | ||
// Migrated from WpMangaReader to Madara. | ||
override val versionId = 2 | ||
|
||
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply { | ||
val urlElement = element.selectFirst(chapterUrlSelector)!! | ||
// Migrated from Madara to Keyoapp. | ||
override val versionId = 4 | ||
|
||
name = urlElement.selectFirst("p.chapter-manhwa-title")?.text() | ||
?: urlElement.ownText() | ||
date_upload = urlElement.selectFirst("span.chapter-release-date > i")?.text() | ||
.let { parseChapterDate(it) } | ||
|
||
val fixedUrl = urlElement.attr("abs:href").toHttpUrl().newBuilder() | ||
.removeAllQueryParameters("style") | ||
.addQueryParameter("style", "list") | ||
.toString() | ||
|
||
setUrlWithoutDomain(fixedUrl) | ||
} | ||
override val cdnUrl = "https://3xfsjdlc.is1.buzz/uploads" | ||
} |