mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Add year for episodes
This commit is contained in:
parent
b4f8cf6261
commit
a6deb8a93e
1 changed files with 5 additions and 0 deletions
|
@ -228,11 +228,14 @@ class NekosamaProvider : MainAPI() {
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
val regexYear = Regex("""Diffusion [a-zA-Z]* (\d*)""")
|
||||||
val infosList =
|
val infosList =
|
||||||
document.selectFirst("div#anime-info-list")?.text()
|
document.selectFirst("div#anime-info-list")?.text()
|
||||||
val isinfosList = !infosList.isNullOrBlank()
|
val isinfosList = !infosList.isNullOrBlank()
|
||||||
|
var year:Int?=null
|
||||||
if (isinfosList) {
|
if (isinfosList) {
|
||||||
if (infosList!!.contains("movie")) mediaType = TvType.AnimeMovie
|
if (infosList!!.contains("movie")) mediaType = TvType.AnimeMovie
|
||||||
|
year =regexYear.find(infosList)!!.groupValues.get(1).toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
val description = document.selectFirst("div.synopsis > p")?.text()
|
val description = document.selectFirst("div.synopsis > p")?.text()
|
||||||
|
@ -247,6 +250,7 @@ class NekosamaProvider : MainAPI() {
|
||||||
) { // retourne les informations du film
|
) { // retourne les informations du film
|
||||||
this.posterUrl = poster
|
this.posterUrl = poster
|
||||||
this.plot = description
|
this.plot = description
|
||||||
|
this.year = year
|
||||||
}
|
}
|
||||||
} else // an anime
|
} else // an anime
|
||||||
{
|
{
|
||||||
|
@ -267,6 +271,7 @@ class NekosamaProvider : MainAPI() {
|
||||||
episodes
|
episodes
|
||||||
)
|
)
|
||||||
this.showStatus = status
|
this.showStatus = status
|
||||||
|
this.year = year
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue