From 1eb2cd0f71d883643aa70fed19bbdd8d9ae7c3e0 Mon Sep 17 00:00:00 2001 From: Claudemirovsky <63046606+Claudemirovsky@users.noreply.github.com> Date: Thu, 7 Mar 2024 19:07:39 -0300 Subject: [PATCH 1/5] fix: Update baseUrl, fixes latest updates page --- .../src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt b/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt index 568c111e86..5f8561a846 100644 --- a/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt +++ b/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt @@ -39,7 +39,7 @@ class Vizer : ConfigurableAnimeSource, AnimeHttpSource() { override val name = "Vizer.tv" - override val baseUrl = "https://vizer.tv" + override val baseUrl = "https://vizertv.in" private val apiUrl = "$baseUrl/includes/ajax" override val lang = "pt-BR" From 5d8a4097be5c8402602d3a95d8bd1d7d3145dab3 Mon Sep 17 00:00:00 2001 From: Claudemirovsky <63046606+Claudemirovsky@users.noreply.github.com> Date: Thu, 7 Mar 2024 19:26:35 -0300 Subject: [PATCH 2/5] fix: Fix season elements selector --- .../src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt b/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt index 5f8561a846..e6602cd9c2 100644 --- a/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt +++ b/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt @@ -178,7 +178,7 @@ class Vizer : ConfigurableAnimeSource, AnimeHttpSource() { override fun episodeListParse(response: Response): List { val doc = response.asJsoup() - val seasons = doc.select("div#seasonsList div.item[data-season-id]") + val seasons = doc.select("div.seasons div.list div.item[data-season-id]") return if (seasons.size > 0) { seasons.flatMap(::getSeasonEps).reversed() } else { From 9a9713c3f245ee44e1dfe2085f892153c4f95cb2 Mon Sep 17 00:00:00 2001 From: Claudemirovsky <63046606+Claudemirovsky@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:35:23 -0300 Subject: [PATCH 3/5] fix: Fix video list --- .../animeextension/pt/vizer/Vizer.kt | 45 +++++++------- .../animeextension/pt/vizer/dto/VizerDto.kt | 58 +++++++++---------- 2 files changed, 50 insertions(+), 53 deletions(-) diff --git a/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt b/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt index e6602cd9c2..8303a0079f 100644 --- a/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt +++ b/src/pt/vizer/src/eu/kanade/tachiyomi/animeextension/pt/vizer/Vizer.kt @@ -5,11 +5,11 @@ import androidx.preference.ListPreference import androidx.preference.PreferenceScreen import eu.kanade.tachiyomi.animeextension.pt.vizer.VizerFilters.FilterSearchParams import eu.kanade.tachiyomi.animeextension.pt.vizer.dto.EpisodeListDto -import eu.kanade.tachiyomi.animeextension.pt.vizer.dto.PlayersDto +import eu.kanade.tachiyomi.animeextension.pt.vizer.dto.HostersDto import eu.kanade.tachiyomi.animeextension.pt.vizer.dto.SearchItemDto import eu.kanade.tachiyomi.animeextension.pt.vizer.dto.SearchResultDto import eu.kanade.tachiyomi.animeextension.pt.vizer.dto.VideoDto -import eu.kanade.tachiyomi.animeextension.pt.vizer.dto.VideoLanguagesDto +import eu.kanade.tachiyomi.animeextension.pt.vizer.dto.VideoListDto import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource import eu.kanade.tachiyomi.animesource.model.AnimeFilterList import eu.kanade.tachiyomi.animesource.model.AnimesPage @@ -24,7 +24,6 @@ import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.awaitSuccess import eu.kanade.tachiyomi.util.asJsoup import eu.kanade.tachiyomi.util.parseAs -import kotlinx.serialization.json.Json import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaType import okhttp3.Request @@ -33,7 +32,6 @@ import okhttp3.Response import org.jsoup.nodes.Element import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -import uy.kohesive.injekt.injectLazy class Vizer : ConfigurableAnimeSource, AnimeHttpSource() { @@ -46,8 +44,6 @@ class Vizer : ConfigurableAnimeSource, AnimeHttpSource() { override val supportsLatest = true - private val json: Json by injectLazy() - private val preferences by lazy { Injekt.get().getSharedPreferences("source_$id", 0x0000) } @@ -65,7 +61,7 @@ class Vizer : ConfigurableAnimeSource, AnimeHttpSource() { override fun popularAnimeParse(response: Response): AnimesPage { val result = response.parseAs() - val animes = result.list.map(::animeFromObject) + val animes = result.items.values.map(::animeFromObject) val hasNext = result.quantity == 35 return AnimesPage(animes, hasNext) } @@ -89,7 +85,7 @@ class Vizer : ConfigurableAnimeSource, AnimeHttpSource() { override fun latestUpdatesParse(response: Response): AnimesPage { val parsedData = response.parseAs() - val animes = parsedData.list.map(::animeFromObject) + val animes = parsedData.items.values.map(::animeFromObject) return AnimesPage(animes, false) } @@ -165,6 +161,7 @@ class Vizer : ConfigurableAnimeSource, AnimeHttpSource() { val sname = seasonElement.text() val response = client.newCall(apiRequest("getEpisodes=$id")).execute() val episodes = response.parseAs().episodes + .values .filter { it.released } .map { SEpisode.create().apply { @@ -201,17 +198,24 @@ class Vizer : ConfigurableAnimeSource, AnimeHttpSource() { } else { // Fake url, its an ID that will be used to get episode languages // (sub/dub) and then return the video link - apiRequest("getEpisodeLanguages=$url") + apiRequest("getEpisodeData=$url") } } override fun videoListParse(response: Response): List