From 6eaf56e046b4a9118741e0d151b4255f5dfeb33b Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:01:21 -0600 Subject: [PATCH 1/5] Keep all JsonProperty for now --- .../metaproviders/TmdbProvider.kt | 169 +++++++++--------- 1 file changed, 85 insertions(+), 84 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/TmdbProvider.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/TmdbProvider.kt index 759d22e4824..6dcf27630ed 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/TmdbProvider.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/TmdbProvider.kt @@ -1,5 +1,6 @@ package com.lagradost.cloudstream3.metaproviders +import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.Actor import com.lagradost.cloudstream3.ActorData import com.lagradost.cloudstream3.Episode @@ -41,11 +42,11 @@ import kotlinx.serialization.Serializable */ @Serializable data class TmdbLink( - @SerialName("imdbID") val imdbID: String?, - @SerialName("tmdbID") val tmdbID: Int?, - @SerialName("episode") val episode: Int?, - @SerialName("season") val season: Int?, - @SerialName("movieName") val movieName: String? = null, + @JsonProperty("imdbID") @SerialName("imdbID") val imdbID: String?, + @JsonProperty("tmdbID") @SerialName("tmdbID") val tmdbID: Int?, + @JsonProperty("episode") @SerialName("episode") val episode: Int?, + @JsonProperty("season") @SerialName("season") val season: Int?, + @JsonProperty("movieName") @SerialName("movieName") val movieName: String? = null, ) open class TmdbProvider : MainAPI() { @@ -67,53 +68,53 @@ open class TmdbProvider : MainAPI() { @Serializable data class TmdbIds( - @SerialName("imdb_id") val imdbId: String? = null, - @SerialName("tvdb_id") val tvdbId: Int? = null, + @JsonProperty("imdb_id") @SerialName("imdb_id") val imdbId: String? = null, + @JsonProperty("tvdb_id") @SerialName("tvdb_id") val tvdbId: Int? = null, ) @Serializable data class TmdbGenre( - @SerialName("id") val id: Int? = null, - @SerialName("name") val name: String? = null, + @JsonProperty("id") @SerialName("id") val id: Int? = null, + @JsonProperty("name") @SerialName("name") val name: String? = null, ) @Serializable data class TmdbCastMember( - @SerialName("name") val name: String? = null, - @SerialName("character") val character: String? = null, - @SerialName("profile_path") val profilePath: String? = null, + @JsonProperty("name") @SerialName("name") val name: String? = null, + @JsonProperty("character") @SerialName("character") val character: String? = null, + @JsonProperty("profile_path") @SerialName("profile_path") val profilePath: String? = null, ) @Serializable data class TmdbCredits( - @SerialName("cast") val cast: List? = null, + @JsonProperty("cast") @SerialName("cast") val cast: List? = null, ) @Serializable data class TmdbVideo( - @SerialName("key") val key: String? = null, - @SerialName("site") val site: String? = null, - @SerialName("type") val type: String? = null, + @JsonProperty("key") @SerialName("key") val key: String? = null, + @JsonProperty("site") @SerialName("site") val site: String? = null, + @JsonProperty("type") @SerialName("type") val type: String? = null, ) @Serializable data class TmdbVideos( - @SerialName("results") val results: List? = null, + @JsonProperty("results") @SerialName("results") val results: List? = null, ) // Shared between movie and tv search results @Serializable data class TmdbSearchResult( - @SerialName("id") val id: Int? = null, - @SerialName("title") val title: String? = null, // movies - @SerialName("original_title") val originalTitle: String? = null, - @SerialName("name") val name: String? = null, // tv - @SerialName("original_name") val originalName: String? = null, - @SerialName("poster_path") val posterPath: String? = null, - @SerialName("vote_average") val voteAverage: Double? = null, - @SerialName("release_date") val releaseDate: String? = null, - @SerialName("first_air_date") val firstAirDate: String? = null, - @SerialName("media_type") val mediaType: String? = null, // for multi-search + @JsonProperty("id") @SerialName("id") val id: Int? = null, + @JsonProperty("title") @SerialName("title") val title: String? = null, // movies + @JsonProperty("original_title") @SerialName("original_title") val originalTitle: String? = null, + @JsonProperty("name") @SerialName("name") val name: String? = null, // tv + @JsonProperty("original_name") @SerialName("original_name") val originalName: String? = null, + @JsonProperty("poster_path") @SerialName("poster_path") val posterPath: String? = null, + @JsonProperty("vote_average") @SerialName("vote_average") val voteAverage: Double? = null, + @JsonProperty("release_date") @SerialName("release_date") val releaseDate: String? = null, + @JsonProperty("first_air_date") @SerialName("first_air_date") val firstAirDate: String? = null, + @JsonProperty("media_type") @SerialName("media_type") val mediaType: String? = null, // for multi-search ) { val isTv get() = name != null || mediaType == "tv" val displayTitle get() = title ?: originalTitle ?: name ?: originalName ?: "" @@ -122,87 +123,87 @@ open class TmdbProvider : MainAPI() { @Serializable data class TmdbPageResult( - @SerialName("results") val results: List? = null, - @SerialName("total_pages") val totalPages: Int? = null, - @SerialName("total_results") val totalResults: Int? = null, + @JsonProperty("results") @SerialName("results") val results: List? = null, + @JsonProperty("total_pages") @SerialName("total_pages") val totalPages: Int? = null, + @JsonProperty("total_results") @SerialName("total_results") val totalResults: Int? = null, ) @Serializable data class TmdbMultiResult( - @SerialName("results") val results: List? = null, + @JsonProperty("results") @SerialName("results") val results: List? = null, ) @Serializable data class TmdbEpisode( - @SerialName("id") val id: Int? = null, - @SerialName("name") val name: String? = null, - @SerialName("overview") val overview: String? = null, - @SerialName("episode_number") val episodeNumber: Int? = null, - @SerialName("season_number") val seasonNumber: Int? = null, - @SerialName("still_path") val stillPath: String? = null, - @SerialName("air_date") val airDate: String? = null, - @SerialName("vote_average") val voteAverage: Double? = null, - @SerialName("external_ids") val externalIds: TmdbIds? = null, + @JsonProperty("id") @SerialName("id") val id: Int? = null, + @JsonProperty("name") @SerialName("name") val name: String? = null, + @JsonProperty("overview") @SerialName("overview") val overview: String? = null, + @JsonProperty("episode_number") @SerialName("episode_number") val episodeNumber: Int? = null, + @JsonProperty("season_number") @SerialName("season_number") val seasonNumber: Int? = null, + @JsonProperty("still_path") @SerialName("still_path") val stillPath: String? = null, + @JsonProperty("air_date") @SerialName("air_date") val airDate: String? = null, + @JsonProperty("vote_average") @SerialName("vote_average") val voteAverage: Double? = null, + @JsonProperty("external_ids") @SerialName("external_ids") val externalIds: TmdbIds? = null, ) @Serializable data class TmdbSeasonDetail( - @SerialName("season_number") val seasonNumber: Int? = null, - @SerialName("episodes") val episodes: List? = null, + @JsonProperty("season_number") @SerialName("season_number") val seasonNumber: Int? = null, + @JsonProperty("episodes") @SerialName("episodes") val episodes: List? = null, ) @Serializable data class TmdbSeasonSummary( - @SerialName("season_number") val seasonNumber: Int? = null, - @SerialName("episode_count") val episodeCount: Int? = null, + @JsonProperty("season_number") @SerialName("season_number") val seasonNumber: Int? = null, + @JsonProperty("episode_count") @SerialName("episode_count") val episodeCount: Int? = null, ) @Serializable data class TmdbContentRating( - @SerialName("iso_3166_1") val country: String? = null, - @SerialName("rating") val rating: String? = null, + @JsonProperty("iso_3166_1") @SerialName("iso_3166_1") val country: String? = null, + @JsonProperty("rating") @SerialName("rating") val rating: String? = null, ) @Serializable data class TmdbContentRatings( - @SerialName("results") val results: List? = null, + @JsonProperty("results") @SerialName("results") val results: List? = null, ) @Serializable data class TmdbReleaseDateEntry( - @SerialName("certification") val certification: String? = null, - @SerialName("type") val type: Int? = null, + @JsonProperty("certification") @SerialName("certification") val certification: String? = null, + @JsonProperty("type") @SerialName("type") val type: Int? = null, ) @Serializable data class TmdbReleaseDateResult( - @SerialName("iso_3166_1") val country: String? = null, - @SerialName("release_dates") val releaseDates: List? = null, + @JsonProperty("iso_3166_1") @SerialName("iso_3166_1") val country: String? = null, + @JsonProperty("release_dates") @SerialName("release_dates") val releaseDates: List? = null, ) @Serializable data class TmdbReleaseDates( - @SerialName("results") val results: List? = null, + @JsonProperty("results") @SerialName("results") val results: List? = null, ) @Serializable data class TmdbTvDetail( - @SerialName("id") val id: Int? = null, - @SerialName("name") val name: String? = null, - @SerialName("original_name") val originalName: String? = null, - @SerialName("overview") val overview: String? = null, - @SerialName("poster_path") val posterPath: String? = null, - @SerialName("first_air_date") val firstAirDate: String? = null, - @SerialName("vote_average") val voteAverage: Double? = null, - @SerialName("genres") val genres: List? = null, - @SerialName("episode_run_time") val episodeRunTime: List? = null, - @SerialName("seasons") val seasons: List? = null, - @SerialName("external_ids") val externalIds: TmdbIds? = null, - @SerialName("videos") val videos: TmdbVideos? = null, - @SerialName("credits") val credits: TmdbCredits? = null, - @SerialName("recommendations") val recommendations: TmdbPageResult? = null, - @SerialName("similar") val similar: TmdbPageResult? = null, - @SerialName("content_ratings") val contentRatings: TmdbContentRatings? = null, + @JsonProperty("id") @SerialName("id") val id: Int? = null, + @JsonProperty("name") @SerialName("name") val name: String? = null, + @JsonProperty("original_name") @SerialName("original_name") val originalName: String? = null, + @JsonProperty("overview") @SerialName("overview") val overview: String? = null, + @JsonProperty("poster_path") @SerialName("poster_path") val posterPath: String? = null, + @JsonProperty("first_air_date") @SerialName("first_air_date") val firstAirDate: String? = null, + @JsonProperty("vote_average") @SerialName("vote_average") val voteAverage: Double? = null, + @JsonProperty("genres") @SerialName("genres") val genres: List? = null, + @JsonProperty("episode_run_time") @SerialName("episode_run_time") val episodeRunTime: List? = null, + @JsonProperty("seasons") @SerialName("seasons") val seasons: List? = null, + @JsonProperty("external_ids") @SerialName("external_ids") val externalIds: TmdbIds? = null, + @JsonProperty("videos") @SerialName("videos") val videos: TmdbVideos? = null, + @JsonProperty("credits") @SerialName("credits") val credits: TmdbCredits? = null, + @JsonProperty("recommendations") @SerialName("recommendations") val recommendations: TmdbPageResult? = null, + @JsonProperty("similar") @SerialName("similar") val similar: TmdbPageResult? = null, + @JsonProperty("content_ratings") @SerialName("content_ratings") val contentRatings: TmdbContentRatings? = null, ) { val displayTitle get() = name ?: originalName ?: "" val year get() = firstAirDate?.take(4)?.toIntOrNull() @@ -210,22 +211,22 @@ open class TmdbProvider : MainAPI() { @Serializable data class TmdbMovieDetail( - @SerialName("id") val id: Int? = null, - @SerialName("title") val title: String? = null, - @SerialName("original_title") val originalTitle: String? = null, - @SerialName("overview") val overview: String? = null, - @SerialName("poster_path") val posterPath: String? = null, - @SerialName("release_date") val releaseDate: String? = null, - @SerialName("vote_average") val voteAverage: Double? = null, - @SerialName("genres") val genres: List? = null, - @SerialName("runtime") val runtime: Int? = null, - @SerialName("imdb_id") val imdbId: String? = null, - @SerialName("external_ids") val externalIds: TmdbIds? = null, - @SerialName("videos") val videos: TmdbVideos? = null, - @SerialName("credits") val credits: TmdbCredits? = null, - @SerialName("recommendations") val recommendations: TmdbPageResult? = null, - @SerialName("similar") val similar: TmdbPageResult? = null, - @SerialName("release_dates") val releaseDates: TmdbReleaseDates? = null, + @JsonProperty("id") @SerialName("id") val id: Int? = null, + @JsonProperty("title") @SerialName("title") val title: String? = null, + @JsonProperty("original_title") @SerialName("original_title") val originalTitle: String? = null, + @JsonProperty("overview") @SerialName("overview") val overview: String? = null, + @JsonProperty("poster_path") @SerialName("poster_path") val posterPath: String? = null, + @JsonProperty("release_date") @SerialName("release_date") val releaseDate: String? = null, + @JsonProperty("vote_average") @SerialName("vote_average") val voteAverage: Double? = null, + @JsonProperty("genres") @SerialName("genres") val genres: List? = null, + @JsonProperty("runtime") @SerialName("runtime") val runtime: Int? = null, + @JsonProperty("imdb_id") @SerialName("imdb_id") val imdbId: String? = null, + @JsonProperty("external_ids") @SerialName("external_ids") val externalIds: TmdbIds? = null, + @JsonProperty("videos") @SerialName("videos") val videos: TmdbVideos? = null, + @JsonProperty("credits") @SerialName("credits") val credits: TmdbCredits? = null, + @JsonProperty("recommendations") @SerialName("recommendations") val recommendations: TmdbPageResult? = null, + @JsonProperty("similar") @SerialName("similar") val similar: TmdbPageResult? = null, + @JsonProperty("release_dates") @SerialName("release_dates") val releaseDates: TmdbReleaseDates? = null, ) { val displayTitle get() = title ?: originalTitle ?: "" val year get() = releaseDate?.take(4)?.toIntOrNull() From 2070cb8b0b5e76a47941781bce4136e97f795bc1 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:04:58 -0600 Subject: [PATCH 2/5] Keep all JsonProperty for now --- .../cloudstream3/extractors/Dailymotion.kt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Dailymotion.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Dailymotion.kt index 0342915969e..0b73b6fee59 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Dailymotion.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Dailymotion.kt @@ -1,5 +1,6 @@ package com.lagradost.cloudstream3.extractors +import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.newSubtitleFile @@ -82,25 +83,25 @@ open class Dailymotion : ExtractorApi() { @Serializable data class MetaData( - @SerialName("qualities") val qualities: Map>?, - @SerialName("subtitles") val subtitles: SubtitlesWrapper?, + @JsonProperty("qualities") @SerialName("qualities") val qualities: Map>?, + @JsonProperty("subtitles") @SerialName("subtitles") val subtitles: SubtitlesWrapper?, ) @Serializable data class Quality( - @SerialName("type") val type: String?, - @SerialName("url") val url: String?, + @JsonProperty("type") @SerialName("type") val type: String?, + @JsonProperty("url") @SerialName("url") val url: String?, ) @Serializable data class SubtitlesWrapper( - @SerialName("enable") val enable: Boolean, - @SerialName("data") val data: Map?, + @JsonProperty("enable") @SerialName("enable") val enable: Boolean, + @JsonProperty("data") @SerialName("data") val data: Map?, ) @Serializable data class SubtitleData( - @SerialName("label") val label: String, - @SerialName("urls") val urls: List, + @JsonProperty("label") @SerialName("label") val label: String, + @JsonProperty("urls") @SerialName("urls") val urls: List, ) } From e82c4a9010f51b313f039a41891c9040589d08e3 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:06:16 -0600 Subject: [PATCH 3/5] Keep all JsonProperty for now --- .../com/lagradost/cloudstream3/extractors/GDMirrorbot.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GDMirrorbot.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GDMirrorbot.kt index 60bf872b704..f34d1bc30c6 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GDMirrorbot.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/GDMirrorbot.kt @@ -1,5 +1,6 @@ package com.lagradost.cloudstream3.extractors +import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.api.Log import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.app @@ -25,18 +26,18 @@ open class GDMirrorbot : ExtractorApi() { @Serializable private data class EmbedData( - @SerialName("data") val data: List? = null, + @JsonProperty("data") @SerialName("data") val data: List? = null, ) @Serializable private data class FileSlug( - @SerialName("fileslug") val fileslug: String? = null, + @JsonProperty("fileslug") @SerialName("fileslug") val fileslug: String? = null, ) @Serializable private data class EmbedHelper( - @SerialName("siteUrls") val siteUrls: Map? = null, - @SerialName("siteFriendlyNames") val siteFriendlyNames: Map? = null, + @JsonProperty("siteUrls") @SerialName("siteUrls") val siteUrls: Map? = null, + @JsonProperty("siteFriendlyNames") @SerialName("siteFriendlyNames") val siteFriendlyNames: Map? = null, ) override suspend fun getUrl( From 4230c5b1c38fc56ac66046f2309f9fa9d583d341 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:07:36 -0600 Subject: [PATCH 4/5] Keep all JsonProperty for now --- .../kotlin/com/lagradost/cloudstream3/extractors/Voe.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Voe.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Voe.kt index 57a62cb268b..5078225aea7 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Voe.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Voe.kt @@ -1,5 +1,6 @@ package com.lagradost.cloudstream3.extractors +import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode @@ -104,8 +105,8 @@ open class Voe : ExtractorApi() { @Serializable private data class VoeDecrypted( - @SerialName("source") val source: String? = null, - @SerialName("direct_access_url") val directAccessUrl: String? = null, + @JsonProperty("source") @SerialName("source") val source: String? = null, + @JsonProperty("direct_access_url") @SerialName("direct_access_url") val directAccessUrl: String? = null, ) private fun decryptF7(p8: String): VoeDecrypted? { From af534ed3c80a08d15eed0fd88f0a9b50cf6f8cdf Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:09:38 -0600 Subject: [PATCH 5/5] Fix --- .../kotlin/com/lagradost/cloudstream3/extractors/Voe.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Voe.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Voe.kt index 5078225aea7..5ee58d612cc 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Voe.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Voe.kt @@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode -import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson +import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.INFER_TYPE @@ -118,7 +118,7 @@ open class Voe : ExtractorApi() { val vF5 = charShift(vF4, 3) val vF6 = reverse(vF5) val vAtob = base64Decode(vF6) - tryParseJson(vAtob) + parseJson(vAtob) } catch (e: Exception) { println("Decryption error: ${e.message}") null