From 7cf81b76dd24e666c5a2b7c6bc087ba78ae8afb3 Mon Sep 17 00:00:00 2001 From: imper1aldev <23511335+imper1aldev@users.noreply.github.com> Date: Mon, 7 Oct 2024 12:06:00 -0600 Subject: [PATCH] fixes (#292) --- src/es/animeonlineninja/build.gradle | 5 +- .../es/animeonlineninja/AnimeOnlineNinja.kt | 89 ++++++++++++------- 2 files changed, 62 insertions(+), 32 deletions(-) diff --git a/src/es/animeonlineninja/build.gradle b/src/es/animeonlineninja/build.gradle index 0d00888d..a578af76 100644 --- a/src/es/animeonlineninja/build.gradle +++ b/src/es/animeonlineninja/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.AnimeOnlineNinja' themePkg = 'dooplay' baseUrl = 'https://ww3.animeonline.ninja' - overrideVersionCode = 39 + overrideVersionCode = 40 } apply from: "$rootDir/common.gradle" @@ -14,4 +14,7 @@ dependencies { implementation(project(':lib:filemoon-extractor')) implementation(project(':lib:mixdrop-extractor')) implementation(project(':lib:uqload-extractor')) + implementation(project(':lib:vidhide-extractor')) + implementation(project(':lib:streamwish-extractor')) + implementation(project(':lib:mp4upload-extractor')) } diff --git a/src/es/animeonlineninja/src/eu/kanade/tachiyomi/animeextension/es/animeonlineninja/AnimeOnlineNinja.kt b/src/es/animeonlineninja/src/eu/kanade/tachiyomi/animeextension/es/animeonlineninja/AnimeOnlineNinja.kt index 06758da5..0fc2d5c7 100644 --- a/src/es/animeonlineninja/src/eu/kanade/tachiyomi/animeextension/es/animeonlineninja/AnimeOnlineNinja.kt +++ b/src/es/animeonlineninja/src/eu/kanade/tachiyomi/animeextension/es/animeonlineninja/AnimeOnlineNinja.kt @@ -4,20 +4,24 @@ import androidx.preference.CheckBoxPreference import androidx.preference.ListPreference import androidx.preference.PreferenceScreen import eu.kanade.tachiyomi.animesource.model.AnimeFilterList +import eu.kanade.tachiyomi.animesource.model.SEpisode import eu.kanade.tachiyomi.animesource.model.Video import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor import eu.kanade.tachiyomi.lib.filemoonextractor.FilemoonExtractor import eu.kanade.tachiyomi.lib.mixdropextractor.MixDropExtractor +import eu.kanade.tachiyomi.lib.mp4uploadextractor.Mp4uploadExtractor import eu.kanade.tachiyomi.lib.streamtapeextractor.StreamTapeExtractor +import eu.kanade.tachiyomi.lib.streamwishextractor.StreamWishExtractor import eu.kanade.tachiyomi.lib.uqloadextractor.UqloadExtractor +import eu.kanade.tachiyomi.lib.vidhideextractor.VidHideExtractor import eu.kanade.tachiyomi.multisrc.dooplay.DooPlay import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.util.asJsoup +import eu.kanade.tachiyomi.util.parallelCatchingFlatMapBlocking import okhttp3.Request import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element -import uy.kohesive.injekt.api.get class AnimeOnlineNinja : DooPlay( "es", @@ -91,7 +95,7 @@ class AnimeOnlineNinja : DooPlay( } else if (path.startsWith("/letra") || path.startsWith("/tendencias")) { val before = path.substringBeforeLast("/") val after = path.substringAfterLast("/") - GET(baseUrl + before + "/page/$page/" + after) + GET("$baseUrl$before/page/$page/$after") } else { GET("$baseUrl$path/page/$page") } @@ -100,11 +104,29 @@ class AnimeOnlineNinja : DooPlay( // ============================== Episodes ============================== override val episodeMovieText = "PelĂ­cula" + override fun episodeListParse(response: Response): List { + val doc = getRealAnimeDoc(response.asJsoup()) + val seasonList = doc.select(seasonListSelector) + return if (seasonList.isEmpty()) { + listOf( + SEpisode.create().apply { + setUrlWithoutDomain(doc.location()) + episode_number = 1F + name = episodeMovieText + }, + ) + } else { + seasonList.reversed().flatMap { seasonElement -> + getSeasonEpisodes(seasonElement).reversed() + } + } + } + // ============================ Video Links ============================= override fun videoListParse(response: Response): List