forked from AlmightyHak/extensions-source
fix(all/torrentioanime): Fix fetching episode list (#192)
This commit is contained in:
parent
c7b610a444
commit
7a71a9d6fd
2 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'Torrentio Anime (Torrent / Debrid)'
|
||||
extClass = '.Torrentio'
|
||||
extVersionCode = 7
|
||||
extVersionCode = 8
|
||||
containsNsfw = false
|
||||
}
|
||||
|
||||
|
|
|
@ -29,9 +29,11 @@ import kotlinx.serialization.json.Json
|
|||
import okhttp3.FormBody
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import org.json.JSONObject
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.net.URL
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
|
@ -358,7 +360,9 @@ class Torrentio : ConfigurableAnimeSource, AnimeHttpSource() {
|
|||
|
||||
// ============================== Episodes ==============================
|
||||
override fun episodeListRequest(anime: SAnime): Request {
|
||||
return GET("https://anime-kitsu.strem.fun/meta/series/anilist%3A${anime.url}.json")
|
||||
val res = URL("https://api.ani.zip/mappings?anilist_id=${anime.url}").readText()
|
||||
val kitsuId = JSONObject(res).getJSONObject("mappings").getInt("kitsu_id").toString()
|
||||
return GET("https://anime-kitsu.strem.fun/meta/series/kitsu%3A$kitsuId.json")
|
||||
}
|
||||
|
||||
override fun episodeListParse(response: Response): List<SEpisode> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue