diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/FillerEpisodeCheck.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/FillerEpisodeCheck.kt index 8456094d1e9..b5d40b4861f 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/FillerEpisodeCheck.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/FillerEpisodeCheck.kt @@ -10,12 +10,14 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.getMalId import com.lagradost.cloudstream3.LoadResponse.Companion.getTMDbId import com.lagradost.cloudstream3.TvType import com.lagradost.cloudstream3.ui.result.getId +import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.Coroutines.main +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import java.io.InputStream import java.lang.Thread.sleep import java.util.* import kotlin.concurrent.thread -import com.lagradost.cloudstream3.utils.AppUtils.parseJson -import java.io.InputStream import kotlin.let object FillerEpisodeCheck { @@ -25,66 +27,45 @@ object FillerEpisodeCheck { return q + "cache" + z } + @Serializable data class Show( - @JsonProperty("slug") - val slug: String, - @JsonProperty("title") - val title: String, - @JsonProperty("filler") - val filler: ArrayList, - @JsonProperty("mixedCanon") - val mixedCanon: ArrayList, - @JsonProperty("mangaCanon") - val mangaCanon: ArrayList, - @JsonProperty("animeCanon") - val animeCanon: ArrayList, + @SerialName("slug") val slug: String, + @SerialName("title") val title: String, + @SerialName("filler") val filler: ArrayList, + @SerialName("mixedCanon") val mixedCanon: ArrayList, + @SerialName("mangaCanon") val mangaCanon: ArrayList, + @SerialName("animeCanon") val animeCanon: ArrayList, ) + @Serializable data class MappingRoot( - @JsonProperty("type") - val type: String?, - @JsonProperty("anidb_id") - val anidbId: Long?, - @JsonProperty("anilist_id") - val anilistId: Long?, - @JsonProperty("animecountdown_id") - val animecountdownId: Long?, - @JsonProperty("animenewsnetwork_id") - val animenewsnetworkId: Long?, - @JsonProperty("anime-planet_id") - val animePlanetId: String?, - @JsonProperty("anisearch_id") - val anisearchId: Long?, - @JsonProperty("imdb_id") - val imdbId: String?, - @JsonProperty("kitsu_id") - val kitsuId: Long?, - @JsonProperty("livechart_id") - val livechartId: Long?, - @JsonProperty("mal_id") - val malId: Long?, - @JsonProperty("simkl_id") - val simklId: Long?, - @JsonProperty("themoviedb_id") - val themoviedbId: Long?, - @JsonProperty("tvdb_id") - val tvdbId: Long?, - @JsonProperty("season") - val season: Season?, + @SerialName("type") val type: String?, + @JsonProperty("anidb_id") @SerialName("anidb_id") val anidbId: Long?, + @JsonProperty("anilist_id") @SerialName("anilist_id") val anilistId: Long?, + @JsonProperty("animecountdown_id") @SerialName("animecountdown_id") val animecountdownId: Long?, + @JsonProperty("animenewsnetwork_id") @SerialName("animenewsnetwork_id") val animenewsnetworkId: Long?, + @JsonProperty("anime-planet_id") @SerialName("anime-planet_id") val animePlanetId: String?, + @JsonProperty("anisearch_id") @SerialName("anisearch_id") val anisearchId: Long?, + @JsonProperty("imdb_id") @SerialName("imdb_id") val imdbId: String?, + @JsonProperty("kitsu_id") @SerialName("kitsu_id") val kitsuId: Long?, + @JsonProperty("livechart_id") @SerialName("livechart_id") val livechartId: Long?, + @JsonProperty("mal_id") @SerialName("mal_id") val malId: Long?, + @JsonProperty("simkl_id") @SerialName("simkl_id") val simklId: Long?, + @JsonProperty("themoviedb_id") @SerialName("themoviedb_id") val themoviedbId: Long?, + @JsonProperty("tvdb_id") @SerialName("tvdb_id") val tvdbId: Long?, + @SerialName("season") val season: Season?, ) + @Serializable data class Season( - @JsonProperty("tvdb") - val tvdb: Long?, - @JsonProperty("tmdb") - val tmdb: Long?, + @SerialName("tvdb") val tvdb: Long?, + @SerialName("tmdb") val tmdb: Long?, ) + @Serializable data class CombinedMedia( - @JsonProperty("mapping") - val mapping: MappingRoot?, - @JsonProperty("show") - val show: Show + @SerialName("mapping") val mapping: MappingRoot?, + @SerialName("show") val show: Show, ) data class Database( @@ -180,4 +161,4 @@ object FillerEpisodeCheck { return counter } -} \ No newline at end of file +}