animeon: Fix posters and player
This commit is contained in:
parent
d2baf99a12
commit
c9aa727f5b
4 changed files with 15 additions and 74 deletions
|
@ -72,7 +72,7 @@ class AnimeONProvider : MainAPI() {
|
|||
val homeList =
|
||||
parsedJSON.results.map {
|
||||
newAnimeSearchResponse(it.titleUa, "anime/${it.id}", TvType.Anime) {
|
||||
this.posterUrl = posterApi.format(it.poster)
|
||||
this.posterUrl = posterApi.format(it.image.preview)
|
||||
}
|
||||
}
|
||||
// Log.d("CakesTwix-Debug", "$cdnUrl${parsedJSON.data[1].posterId}")
|
||||
|
@ -82,7 +82,7 @@ class AnimeONProvider : MainAPI() {
|
|||
val homeList =
|
||||
parsedJSON.map {
|
||||
newAnimeSearchResponse(it.titleUa, "anime/${it.id}", TvType.Anime) {
|
||||
this.posterUrl = posterApi.format(it.poster)
|
||||
this.posterUrl = posterApi.format(it.image.preview)
|
||||
}
|
||||
}
|
||||
// Log.d("CakesTwix-Debug", "$cdnUrl${parsedJSON.data[1].posterId}")
|
||||
|
@ -136,7 +136,7 @@ class AnimeONProvider : MainAPI() {
|
|||
|
||||
val episodes = mutableListOf<Episode>()
|
||||
|
||||
val playerRawJson = app.get(animeJSON.player.url).document.select("script").html()
|
||||
val playerRawJson = app.get(animeJSON.player[0].url).document.select("script").html()
|
||||
.substringAfterLast("file:\'")
|
||||
.substringBefore("\',")
|
||||
|
||||
|
@ -145,7 +145,7 @@ class AnimeONProvider : MainAPI() {
|
|||
for (episode in season.folder) { // Episodes
|
||||
episodes.add(
|
||||
Episode(
|
||||
"${season.title}, ${episode.title}, ${animeJSON.player.url}",
|
||||
"${season.title}, ${episode.title}, ${animeJSON.player[0].url}",
|
||||
episode.title,
|
||||
season.title.replace(" Сезон ", "").toIntOrNull(),
|
||||
episode.title.replace("Серія ", "").toIntOrNull(),
|
||||
|
@ -176,7 +176,7 @@ class AnimeONProvider : MainAPI() {
|
|||
addMalId(animeJSON.malId)
|
||||
}
|
||||
} else {
|
||||
newMovieLoadResponse(animeJSON.titleUa, "$mainUrl/anime/${animeJSON.id}", tvType, "${animeJSON.titleUa}, ${animeJSON.player.url}") {
|
||||
newMovieLoadResponse(animeJSON.titleUa, "$mainUrl/anime/${animeJSON.id}", tvType, "${animeJSON.titleUa}, ${animeJSON.player[0].url}") {
|
||||
this.posterUrl = posterApi.format(animeJSON.poster)
|
||||
this.tags = animeJSON.genres.map { it.name }
|
||||
this.plot = animeJSON.description
|
||||
|
|
|
@ -9,94 +9,39 @@ class AnimeInfoModel (
|
|||
@SerializedName("titleEn") val titleEn : String,
|
||||
@SerializedName("description") val description : String,
|
||||
@SerializedName("releaseDate") val releaseDate : Int,
|
||||
@SerializedName("producer") val producer : String,
|
||||
@SerializedName("views") val views : Int,
|
||||
@SerializedName("episodes") val episodes : Int,
|
||||
@SerializedName("episodeTime") val episodeTime : String,
|
||||
@SerializedName("poster") val poster : String,
|
||||
@SerializedName("backgroundImage") val backgroundImage : String,
|
||||
@SerializedName("episodesAired") val episodesAired : Int,
|
||||
@SerializedName("createdAt") val createdAt : String,
|
||||
@SerializedName("updatedAt") val updatedAt : String,
|
||||
@SerializedName("trailer") val trailer : String,
|
||||
@SerializedName("ashdiId") val ashdiId : String,
|
||||
@SerializedName("malId") val malId : Int,
|
||||
@SerializedName("pl") val pl : String,
|
||||
@SerializedName("season") val season : Int,
|
||||
@SerializedName("rating") val rating : Double,
|
||||
@SerializedName("genres") val genres : List<Genres>,
|
||||
@SerializedName("tags") val tags : List<Tags>,
|
||||
@SerializedName("studio") val studio : Studio,
|
||||
@SerializedName("status") val status : Status,
|
||||
@SerializedName("age") val age : Age,
|
||||
@SerializedName("fundups") val fundups : List<Fundups>,
|
||||
@SerializedName("type") val type : Type,
|
||||
@SerializedName("schedule") val schedule : Schedule,
|
||||
@SerializedName("franchise") val franchise : Franchise,
|
||||
@SerializedName("player") val player : Player,
|
||||
@SerializedName("screenshots") val screenshots : List<Screenshots>,
|
||||
@SerializedName("rank") val rank : Int,
|
||||
@SerializedName("votes") val votes : Int
|
||||
@SerializedName("player") val player : List<Player>,
|
||||
)
|
||||
|
||||
data class Schedule (
|
||||
data class Genres (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("date") val name : String,
|
||||
@SerializedName("episode") val episode : String,
|
||||
)
|
||||
|
||||
data class Age (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("name") val name : String
|
||||
)
|
||||
|
||||
data class Franchise (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("weight") val weight : Int
|
||||
)
|
||||
|
||||
data class Fundups (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("name") val name : String
|
||||
@SerializedName("name") val name : String,
|
||||
@SerializedName("malId") val malId : String,
|
||||
)
|
||||
|
||||
data class Player (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("id") val id : Long,
|
||||
@SerializedName("url") val url : String,
|
||||
@SerializedName("numEpisodeFrom") val numEpisodeFrom : String,
|
||||
@SerializedName("numEpisodeTo") val numEpisodeTo : String
|
||||
)
|
||||
|
||||
data class Screenshots (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("original") val original : String,
|
||||
@SerializedName("preview") val preview : String
|
||||
)
|
||||
|
||||
data class Status (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("name") val name : String
|
||||
)
|
||||
|
||||
data class Studio (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("name") val name : String
|
||||
)
|
||||
|
||||
data class Tags (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("name") val name : String
|
||||
)
|
||||
|
||||
data class Type (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
|
|
|
@ -5,16 +5,12 @@ import com.google.gson.annotations.SerializedName
|
|||
class AnimeModel (
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("titleUa") val titleUa : String,
|
||||
@SerializedName("description") val description : String,
|
||||
@SerializedName("poster") val poster : String,
|
||||
@SerializedName("backgroundImage") val backgroundImage : String,
|
||||
@SerializedName("rating") val rating : Double,
|
||||
@SerializedName("genres") val genres : List<Genres>
|
||||
@SerializedName("image") val image : Image,
|
||||
)
|
||||
|
||||
data class Genres (
|
||||
data class Image (
|
||||
|
||||
@SerializedName("id") val id : Int,
|
||||
@SerializedName("name") val name : String,
|
||||
@SerializedName("malId") val malId : Int
|
||||
@SerializedName("original") val original : String,
|
||||
@SerializedName("preview") val preview : String
|
||||
)
|
|
@ -16,7 +16,7 @@ data class Results (
|
|||
@SerializedName("releaseDate") val releaseDate : Int,
|
||||
@SerializedName("views") val views : Int,
|
||||
@SerializedName("episodes") val episodes : Int,
|
||||
@SerializedName("poster") val poster : String,
|
||||
@SerializedName("image") val image : Image,
|
||||
@SerializedName("episodesAired") val episodesAired : Int,
|
||||
@SerializedName("createdAt") val createdAt : String,
|
||||
@SerializedName("malId") val malId : Int,
|
||||
|
|
Loading…
Reference in a new issue