mirror of
https://github.com/recloudstream/cloudstream-extensions.git
synced 2024-08-15 03:03:54 +00:00
[Fix] NullException thrown at line 286. Fix missing element for year text
This commit is contained in:
parent
f6a0010d31
commit
ebf31e9fe8
2 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -283,8 +283,9 @@ class TenshiProvider : MainAPI() {
|
||||||
?.trim()
|
?.trim()
|
||||||
|
|
||||||
val pattern = Regex("(\\d{4})")
|
val pattern = Regex("(\\d{4})")
|
||||||
val yearText = document.selectFirst("li.release-date .value")!!.text()
|
document.selectFirst("li.release-date .value")?.text()?.let {
|
||||||
year = pattern.find(yearText)?.groupValues?.get(1)?.toIntOrNull()
|
year = pattern.find(it)?.groupValues?.get(1)?.toIntOrNull()
|
||||||
|
}
|
||||||
|
|
||||||
addEpisodes(DubStatus.Subbed, episodes)
|
addEpisodes(DubStatus.Subbed, episodes)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue