diff --git a/multisrc/overrides/animestream/mykdrama/additional.gradle b/multisrc/overrides/animestream/mykdrama/additional.gradle new file mode 100644 index 0000000000..ea9a4ad60c --- /dev/null +++ b/multisrc/overrides/animestream/mykdrama/additional.gradle @@ -0,0 +1,6 @@ +dependencies { + implementation(project(":lib:okru-extractor")) + implementation(project(":lib:uqload-extractor")) + implementation(project(":lib:dood-extractor")) + implementation(project(":lib:vudeo-extractor")) +} \ No newline at end of file diff --git a/multisrc/overrides/animestream/mykdrama/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/animestream/mykdrama/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..d600c65eb4 Binary files /dev/null and b/multisrc/overrides/animestream/mykdrama/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/animestream/mykdrama/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/animestream/mykdrama/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..191b18c30a Binary files /dev/null and b/multisrc/overrides/animestream/mykdrama/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/animestream/mykdrama/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/animestream/mykdrama/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..810703c8d1 Binary files /dev/null and b/multisrc/overrides/animestream/mykdrama/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/animestream/mykdrama/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/animestream/mykdrama/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..b729cc272e Binary files /dev/null and b/multisrc/overrides/animestream/mykdrama/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/animestream/mykdrama/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/animestream/mykdrama/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..2defcebccd Binary files /dev/null and b/multisrc/overrides/animestream/mykdrama/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/animestream/mykdrama/res/web_hi_res_512.png b/multisrc/overrides/animestream/mykdrama/res/web_hi_res_512.png new file mode 100644 index 0000000000..579972f1b3 Binary files /dev/null and b/multisrc/overrides/animestream/mykdrama/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/animestream/mykdrama/src/MyKdrama.kt b/multisrc/overrides/animestream/mykdrama/src/MyKdrama.kt new file mode 100644 index 0000000000..83259f057f --- /dev/null +++ b/multisrc/overrides/animestream/mykdrama/src/MyKdrama.kt @@ -0,0 +1,117 @@ +package eu.kanade.tachiyomi.animeextension.fr.mykdrama + +import eu.kanade.tachiyomi.animeextension.fr.mykdrama.MyKdramaFilters.CountryFilter +import eu.kanade.tachiyomi.animeextension.fr.mykdrama.MyKdramaFilters.GenresFilter +import eu.kanade.tachiyomi.animeextension.fr.mykdrama.MyKdramaFilters.OrderFilter +import eu.kanade.tachiyomi.animeextension.fr.mykdrama.MyKdramaFilters.StatusFilter +import eu.kanade.tachiyomi.animeextension.fr.mykdrama.MyKdramaFilters.TypeFilter +import eu.kanade.tachiyomi.animeextension.fr.mykdrama.MyKdramaFilters.getSearchParameters +import eu.kanade.tachiyomi.animesource.model.AnimeFilter +import eu.kanade.tachiyomi.animesource.model.AnimeFilterList +import eu.kanade.tachiyomi.animesource.model.Video +import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor +import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor +import eu.kanade.tachiyomi.lib.uqloadextractor.UqloadExtractor +import eu.kanade.tachiyomi.lib.vudeoextractor.VudeoExtractor +import eu.kanade.tachiyomi.multisrc.animestream.AnimeStream +import eu.kanade.tachiyomi.multisrc.animestream.AnimeStreamFilters +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.util.asJsoup +import eu.kanade.tachiyomi.util.parallelCatchingFlatMapBlocking +import okhttp3.HttpUrl +import okhttp3.HttpUrl.Companion.toHttpUrl +import okhttp3.Request +import okhttp3.Response +import java.text.SimpleDateFormat +import java.util.Locale + +class MyKdrama : AnimeStream( + "fr", + "MyKdrama", + "https://mykdrama.co", +) { + override val animeListUrl = "$baseUrl/drama" + + override val dateFormatter by lazy { + SimpleDateFormat("MMMM dd, yyyy", Locale("fr")) + } + + // =============================== Search =============================== + override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList): Request { + val params = getSearchParameters(filters) + return if (query.isNotEmpty()) { + GET("$baseUrl/page/$page/?s=$query") + } else { + val queryParams = params.run { listOf(genres, countries) } + .filter(String::isNotBlank) + .joinToString("&") + val url = "$animeListUrl/?$queryParams".toHttpUrl().newBuilder() + .addQueryParameter("page", "$page") + .addIfNotBlank("status", params.status) + .addIfNotBlank("type", params.type) + .addIfNotBlank("order", params.order) + .build() + GET(url, headers) + } + } + + // ============================== Filters =============================== + override val filtersSelector = "div.filter > ul" + + override fun getFilterList(): AnimeFilterList { + return if (AnimeStreamFilters.filterInitialized()) { + AnimeFilterList( + GenresFilter("Genres"), + CountryFilter("Pays"), + AnimeFilter.Separator(), + StatusFilter("Status"), + TypeFilter("Type"), + OrderFilter("Ordre"), + ) + } else { + AnimeFilterList(AnimeFilter.Header(filtersMissingWarning)) + } + } + + // ============================ Video Links ============================= + override val prefQualityValues = arrayOf("1080p", "720p", "480p", "360p", "240p", "144p") + override val prefQualityEntries = prefQualityValues + + override fun videoListParse(response: Response): List