diff --git a/src/en/battleinfivesecondsaftermeeting/build.gradle b/src/en/battleinfivesecondsaftermeeting/build.gradle new file mode 100644 index 000000000..6d1a29a3b --- /dev/null +++ b/src/en/battleinfivesecondsaftermeeting/build.gradle @@ -0,0 +1,10 @@ +ext { + extName = 'Battle In 5 Seconds After Meeting' + extClass = '.BattleInFiveSecondsAfterMeeting' + themePkg = 'madara' + baseUrl = 'https://www.deatte5.com' + overrideVersionCode = 0 + isNsfw = false +} + +apply from: "$rootDir/common.gradle" diff --git a/src/en/battleinfivesecondsaftermeeting/res/mipmap-hdpi/ic_launcher.png b/src/en/battleinfivesecondsaftermeeting/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..32f0bec13 Binary files /dev/null and b/src/en/battleinfivesecondsaftermeeting/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/en/battleinfivesecondsaftermeeting/res/mipmap-mdpi/ic_launcher.png b/src/en/battleinfivesecondsaftermeeting/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..e98ddf0ca Binary files /dev/null and b/src/en/battleinfivesecondsaftermeeting/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/en/battleinfivesecondsaftermeeting/res/mipmap-xhdpi/ic_launcher.png b/src/en/battleinfivesecondsaftermeeting/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..7814efb24 Binary files /dev/null and b/src/en/battleinfivesecondsaftermeeting/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/en/battleinfivesecondsaftermeeting/res/mipmap-xxhdpi/ic_launcher.png b/src/en/battleinfivesecondsaftermeeting/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..c21a53279 Binary files /dev/null and b/src/en/battleinfivesecondsaftermeeting/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/en/battleinfivesecondsaftermeeting/res/mipmap-xxxhdpi/ic_launcher.png b/src/en/battleinfivesecondsaftermeeting/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..31fbbdf7b Binary files /dev/null and b/src/en/battleinfivesecondsaftermeeting/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/en/battleinfivesecondsaftermeeting/src/eu/kanade/tachiyomi/extension/en/battleinfivesecondsaftermeeting/BattleInFiveSecondsAfterMeeting.kt b/src/en/battleinfivesecondsaftermeeting/src/eu/kanade/tachiyomi/extension/en/battleinfivesecondsaftermeeting/BattleInFiveSecondsAfterMeeting.kt new file mode 100644 index 000000000..e422a26af --- /dev/null +++ b/src/en/battleinfivesecondsaftermeeting/src/eu/kanade/tachiyomi/extension/en/battleinfivesecondsaftermeeting/BattleInFiveSecondsAfterMeeting.kt @@ -0,0 +1,73 @@ +package eu.kanade.tachiyomi.extension.en.battleinfivesecondsaftermeeting + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.source.model.FilterList +import eu.kanade.tachiyomi.source.model.MangasPage +import eu.kanade.tachiyomi.source.model.SChapter +import eu.kanade.tachiyomi.source.model.SManga +import eu.kanade.tachiyomi.util.asJsoup +import okhttp3.Response +import rx.Observable + +class BattleInFiveSecondsAfterMeeting : Madara( + "Battle In 5 Seconds After Meeting", + "https://www.deatte5.com", + "en", +) { + override val supportsLatest = false + override val fetchGenres = false + + override val mangaDetailsSelectorTitle = "h1" + override val mangaDetailsSelectorAuthor = "h5:contains(Author) + h4 a" + override val mangaDetailsSelectorArtist = "h5:contains(Artist) + h4 a" + override val mangaDetailsSelectorDescription = ".synopsis p" + override val mangaDetailsSelectorThumbnail = ".cover_managa img" + override val mangaDetailsSelectorStatus = "h5:contains(Status) + h4" + override val mangaDetailsSelectorTag = "h5:contains(Tag) + h4 a" + override val seriesTypeSelector = "h5:contains(Type) + h4" + override val altNameSelector = "h5:contains(Alternative) + h4" + + override fun fetchSearchManga( + page: Int, + query: String, + filters: FilterList, + ): Observable { + return fetchPopularManga(page) + } + + override fun fetchPopularManga(page: Int): Observable { + val manga = SManga.create().apply { + setUrlWithoutDomain(baseUrl) + title = "Battle in 5 Seconds After Meeting Manga" + thumbnail_url = "$baseUrl/wp-content/uploads/2022/01/48.jpg" + } + + return Observable.just(MangasPage(listOf(manga), false)) + } + + override fun chapterListParse(response: Response): List { + val document = response.asJsoup() + + launchIO { countViews(document) } + + val chapterElements = document.select(".main-chapter") + val recentChapters = document.select(chapterListSelector()).map(::chapterFromElement) + + return chapterElements.map { element -> + SChapter.create().apply { + val chapterContent = element.selectFirst(".chapter-content")!!.text() + setUrlWithoutDomain(element.selectFirst("a")!!.attr("abs:href")) + name = chapterContent.removePrefix("Battle in 5 Seconds After Meeting, ") + + val otherChapter = recentChapters.find { it.name == chapterContent } + if (otherChapter != null) { + date_upload = otherChapter.date_upload + } + } + } + } + + override fun getFilterList(): FilterList { + return FilterList() + } +}