diff --git a/UnimayProvider/src/main/kotlin/com/lagradost/UnimayProvider.kt b/UnimayProvider/src/main/kotlin/com/lagradost/UnimayProvider.kt index 716feaa..6b0c9e1 100644 --- a/UnimayProvider/src/main/kotlin/com/lagradost/UnimayProvider.kt +++ b/UnimayProvider/src/main/kotlin/com/lagradost/UnimayProvider.kt @@ -20,7 +20,6 @@ import com.lagradost.cloudstream3.newAnimeSearchResponse import com.lagradost.cloudstream3.newHomePageResponse import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper -import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.models.Releases import com.lagradost.models.SearchModel @@ -38,7 +37,7 @@ class UnimayProvider : MainAPI() { ) private val apiUrl = "https://api.unimay.media" - private val findUrl = "$apiUrl/api/release/search/?title=" + private val findUrl = "$apiUrl/v1/release/search?title=" private val imagesUrl = "$apiUrl/storage/images/" // Sections @@ -72,7 +71,8 @@ class UnimayProvider : MainAPI() { // Detailed information override suspend fun load(url: String): LoadResponse { - val anime = app.get("$apiUrl/api/release/${url.substringAfterLast("/")}").parsedSafe()!! + // Log.d("CakesTwix-Debug", url) + val anime = app.get(url).parsedSafe()!! // val anime = Gson().fromJson(app.get("$apiUrl/api/release/${url.substringAfterLast("/")}").text, SearchModel::class.java) val showStatus = when(anime.statusCode){ @@ -138,23 +138,6 @@ class UnimayProvider : MainAPI() { return true } - if (episode.sd != null) { - callback(ExtractorLink(episode.sd,"Unimay", episode.sd, "https://www.unimay.media", - Qualities.P480.value, false)) - } - if (episode.hd != null) { - callback(ExtractorLink(episode.hd,"Unimay", episode.hd, "https://www.unimay.media", - Qualities.P720.value, false)) - } - if (episode.fhd != null) { - callback(ExtractorLink(episode.fhd,"Unimay", episode.fhd, "https://www.unimay.media", - Qualities.P1080.value, false)) - } - if (episode.qhd != null) { - callback(ExtractorLink(episode.qhd,"Unimay", episode.qhd, "https://www.unimay.media", - Qualities.P2160.value, false)) - } - return true } } diff --git a/UnimayProvider/src/main/kotlin/com/lagradost/models/Search.kt b/UnimayProvider/src/main/kotlin/com/lagradost/models/Search.kt index 8ec82ad..2408c52 100644 --- a/UnimayProvider/src/main/kotlin/com/lagradost/models/Search.kt +++ b/UnimayProvider/src/main/kotlin/com/lagradost/models/Search.kt @@ -2,79 +2,29 @@ package com.lagradost.models data class SearchModel ( - val id : Int, - val aniListId : Int, - val episodes : Int, - val episodeLength : Int, - val year : Int, - val restricted : Boolean, - val active : Boolean, - val announce : String, val code : String, - val tgCode : String, - val cdnCode : String, + val year : Int, val description : String, - val lastUpdate : Long, - val name : String, - val engName : String, - // https://api.unimay.media/api/release/suzume-locking-up-the-doors - // val trailerPlaylist : String?, - val timestamp : Long, - val season : String, val type : String, - val posterId : Int, - val imageId : Int, - val genres : List, + val engName : String, + // val translators : List, val playlist : List, - val playlistSize : Int, - val actors : List, - val translators : List, - val soundmans : List, - val genresInString : String, - val statusCode : Int -) - -data class Actors ( - - val id : Int, - val firstName : String, - val lastName : String, - val nickName : String, - val city : String, - val avtarId : Int + val genres : List, + val aniListId : Int, + val imageId : Int, + val name : String, + val posterId : Int, + val statusCode : Int, + val episodeLength : Int, ) data class Playlist ( - // val id : Int, - val number : Int, + val preview : Int, val title : String, - val preview : String?, - val previewId : Int?, - val sd : String?, - val hd : String?, - val fhd : String?, - val qhd : String?, - val playlist : String?, - val hidden : Boolean + val number : Int, + val previewId : Int, + val playlist : String, ) -data class Soundmans ( - val id : Int, - val firstName : String, - val lastName : String, - val nickName : String, - val city : String, - val avtarId : Int -) - -data class Translators ( - - val id : Int, - val firstName : String, - val lastName : String, - val nickName : String, - val city : String, - val avtarId : Int -)