diff --git a/src/es/serieskao/build.gradle b/src/es/serieskao/build.gradle new file mode 100644 index 0000000000..86a401d581 --- /dev/null +++ b/src/es/serieskao/build.gradle @@ -0,0 +1,31 @@ +ext { + extName = 'Serieskao' + extClass = '.Serieskao' + extVersionCode = 1 +} + +apply from: "$rootDir/common.gradle" + +dependencies { + implementation(project(':lib:vudeo-extractor')) + implementation(project(':lib:uqload-extractor')) + implementation(project(':lib:streamwish-extractor')) + implementation(project(':lib:filemoon-extractor')) + implementation(project(':lib:streamlare-extractor')) + implementation(project(':lib:yourupload-extractor')) + implementation(project(':lib:streamtape-extractor')) + implementation(project(':lib:dood-extractor')) + implementation(project(':lib:voe-extractor')) + implementation(project(':lib:okru-extractor')) + implementation(project(':lib:mp4upload-extractor')) + implementation(project(':lib:mixdrop-extractor')) + implementation(project(':lib:burstcloud-extractor')) + implementation(project(':lib:fastream-extractor')) + implementation(project(':lib:upstream-extractor')) + implementation(project(':lib:streamhidevid-extractor')) + implementation(project(':lib:streamsilk-extractor')) + implementation(project(':lib:vidguard-extractor')) + implementation(project(':lib:universal-extractor')) + implementation(project(':lib:cryptoaes')) + implementation libs.jsunpacker +} \ No newline at end of file diff --git a/src/es/serieskao/res/mipmap-hdpi/ic_launcher.png b/src/es/serieskao/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..133bf1bb1b Binary files /dev/null and b/src/es/serieskao/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/es/serieskao/res/mipmap-mdpi/ic_launcher.png b/src/es/serieskao/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..14e07068fd Binary files /dev/null and b/src/es/serieskao/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/es/serieskao/res/mipmap-xhdpi/ic_launcher.png b/src/es/serieskao/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..4be9347008 Binary files /dev/null and b/src/es/serieskao/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/es/serieskao/res/mipmap-xxhdpi/ic_launcher.png b/src/es/serieskao/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..70e9bc0972 Binary files /dev/null and b/src/es/serieskao/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/es/serieskao/res/mipmap-xxxhdpi/ic_launcher.png b/src/es/serieskao/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..60ec63b5c4 Binary files /dev/null and b/src/es/serieskao/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/es/serieskao/src/eu/kanade/tachiyomi/animeextension/es/serieskao/Serieskao.kt b/src/es/serieskao/src/eu/kanade/tachiyomi/animeextension/es/serieskao/Serieskao.kt new file mode 100644 index 0000000000..39a27d40b4 --- /dev/null +++ b/src/es/serieskao/src/eu/kanade/tachiyomi/animeextension/es/serieskao/Serieskao.kt @@ -0,0 +1,417 @@ +package eu.kanade.tachiyomi.animeextension.es.serieskao + +import android.app.Application +import android.content.SharedPreferences +import android.util.Log +import androidx.preference.ListPreference +import androidx.preference.PreferenceScreen +import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource +import eu.kanade.tachiyomi.animesource.model.AnimeFilter +import eu.kanade.tachiyomi.animesource.model.AnimeFilterList +import eu.kanade.tachiyomi.animesource.model.SAnime +import eu.kanade.tachiyomi.animesource.model.SEpisode +import eu.kanade.tachiyomi.animesource.model.Video +import eu.kanade.tachiyomi.animesource.online.ParsedAnimeHttpSource +import eu.kanade.tachiyomi.lib.burstcloudextractor.BurstCloudExtractor +import eu.kanade.tachiyomi.lib.cryptoaes.CryptoAES +import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor +import eu.kanade.tachiyomi.lib.fastreamextractor.FastreamExtractor +import eu.kanade.tachiyomi.lib.filemoonextractor.FilemoonExtractor +import eu.kanade.tachiyomi.lib.mp4uploadextractor.Mp4uploadExtractor +import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor +import eu.kanade.tachiyomi.lib.streamhidevidextractor.StreamHideVidExtractor +import eu.kanade.tachiyomi.lib.streamlareextractor.StreamlareExtractor +import eu.kanade.tachiyomi.lib.streamsilkextractor.StreamSilkExtractor +import eu.kanade.tachiyomi.lib.streamtapeextractor.StreamTapeExtractor +import eu.kanade.tachiyomi.lib.streamwishextractor.StreamWishExtractor +import eu.kanade.tachiyomi.lib.universalextractor.UniversalExtractor +import eu.kanade.tachiyomi.lib.upstreamextractor.UpstreamExtractor +import eu.kanade.tachiyomi.lib.uqloadextractor.UqloadExtractor +import eu.kanade.tachiyomi.lib.vidguardextractor.VidGuardExtractor +import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor +import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.util.asJsoup +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.Json +import okhttp3.Request +import okhttp3.Response +import org.jsoup.nodes.Document +import org.jsoup.nodes.Element +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.api.get + +open class Serieskao : ConfigurableAnimeSource, ParsedAnimeHttpSource() { + + override val name = "SeriesKao" + + override val baseUrl = "https://serieskao.top" + + override val lang = "es" + + override val supportsLatest = false + + private val preferences: SharedPreferences by lazy { + Injekt.get().getSharedPreferences("source_$id", 0x0000) + } + + companion object { + const val PREF_QUALITY_KEY = "preferred_quality" + const val PREF_QUALITY_DEFAULT = "1080" + val QUALITY_LIST = arrayOf("1080", "720", "480", "360") + + private const val PREF_LANGUAGE_KEY = "preferred_language" + private const val PREF_LANGUAGE_DEFAULT = "[LAT]" + private val LANGUAGE_LIST = arrayOf("[LAT]", "[SUB]", "[CAST]") + + private const val PREF_SERVER_KEY = "preferred_server" + private const val PREF_SERVER_DEFAULT = "Voe" + private val SERVER_LIST = arrayOf( + "YourUpload", "BurstCloud", "Voe", "Mp4Upload", "Doodstream", + "Upload", "BurstCloud", "Upstream", "StreamTape", "Amazon", + "Fastream", "Filemoon", "StreamWish", "Okru", "Streamlare", + "VidGuard", + ) + } + + override fun popularAnimeSelector(): String = "div.Posters a.Posters-link" + + override fun popularAnimeRequest(page: Int): Request = GET("$baseUrl/series?page=$page") + + override fun popularAnimeFromElement(element: Element): SAnime { + return SAnime.create().apply { + setUrlWithoutDomain(element.select("a").attr("abs:href")) + title = element.select("a div.listing-content p").text() + thumbnail_url = element.select("a img").attr("src").replace("/w154/", "/w200/") + } + } + + override fun popularAnimeNextPageSelector(): String = "a.page-link" + + override fun episodeListParse(response: Response): List { + val episodes = mutableListOf() + val jsoup = response.asJsoup() + if (response.request.url.toString().contains("/pelicula/")) { + val episode = SEpisode.create().apply { + episode_number = 1F + name = "PELÍCULA" + setUrlWithoutDomain(response.request.url.toString()) + } + episodes.add(episode) + } else { + jsoup.select("div.tab-content div a").forEachIndexed { index, element -> + val episode = SEpisode.create().apply { + episode_number = (index + 1).toFloat() + name = element.text() + setUrlWithoutDomain(element.attr("abs:href")) + } + episodes.add(episode) + } + } + return episodes.reversed() + } + + override fun episodeListSelector() = throw UnsupportedOperationException() + + override fun episodeFromElement(element: Element) = throw UnsupportedOperationException() + + override fun videoListParse(response: Response): List