aniage: add tvType

This commit is contained in:
CakesTwix 2023-08-04 12:34:03 +03:00
parent 00fb7f5ba5
commit f36e41caa4
Signed by: CakesTwix
GPG key ID: 7B11051D5CE19825
2 changed files with 16 additions and 3 deletions

View file

@ -115,6 +115,19 @@ class AniageProvider : MainAPI() {
} }
} }
val tvType = with(animeJSON.pageProps.type){
when{
contains("ТБ-Серіал") -> TvType.Anime
contains("ТБ-Спешл") -> TvType.Anime
contains("OVA") -> TvType.OVA
contains("SPECIAL") -> TvType.OVA
contains("ONA") -> TvType.OVA
contains("Повнометражне") -> TvType.AnimeMovie
contains("Короткометражне") -> TvType.AnimeMovie
else -> TvType.Anime
}
}
// Episodes // Episodes
// https://master.api.aniage.net/anime/episodes // https://master.api.aniage.net/anime/episodes
// ?animeId=2c60c269-049e-428b-96ba-fae23ac718ec // ?animeId=2c60c269-049e-428b-96ba-fae23ac718ec
@ -143,7 +156,7 @@ class AniageProvider : MainAPI() {
return newAnimeLoadResponse( return newAnimeLoadResponse(
animeJSON.pageProps.title, animeJSON.pageProps.title,
"$mainUrl/watch/$animeID", "$mainUrl/watch/$animeID",
TvType.Anime, tvType,
) { ) {
this.posterUrl = "$cdnUrl${animeJSON.pageProps.posterId}" this.posterUrl = "$cdnUrl${animeJSON.pageProps.posterId}"
this.engName = animeJSON.pageProps.alternativeTitle this.engName = animeJSON.pageProps.alternativeTitle

View file

@ -1,6 +1,6 @@
<p align="center" style="font-size:25px;"> <p align="center">
<!-- Title --> <!-- Title -->
<img src="assets/cloudstream3.png" width="256"/><br> <img src="assets/cloudstream3.png" width="128"/><br>
<b>🇺🇦 Розширення Cloudstream (Україна)</b> <b>🇺🇦 Розширення Cloudstream (Україна)</b>
</p> </p>
<p align="center"> <p align="center">