better code

This commit is contained in:
hexated 2023-02-02 15:46:38 +07:00
parent b7b1f0ceee
commit aa42180d4e
2 changed files with 1 additions and 5 deletions

View file

@ -800,7 +800,6 @@ object SoraExtractor : SoraStream() {
suspend fun invokeSoraStream( suspend fun invokeSoraStream(
title: String? = null, title: String? = null,
isAnime: Boolean = false,
year: Int? = null, year: Int? = null,
season: Int? = null, season: Int? = null,
episode: Int? = null, episode: Int? = null,
@ -846,9 +845,7 @@ object SoraExtractor : SoraStream() {
) && (it.second == year || it.first.contains("Season $season", true)) ) && (it.second == year || it.first.contains("Season $season", true))
} }
else -> { else -> {
(if (isAnime) it.first.contains(Regex("(?i)$title\\s?($season|${season.toRomanNumeral()})")) else it.first.contains( it.first.contains(Regex("(?i)$title\\s?($season|${season.toRomanNumeral()}|Season\\s$season)")) && it.second == year
Regex("(?i)$title\\s?Season\\s$season")
)) && it.second == year
} }
} }
} }

View file

@ -332,7 +332,6 @@ open class SoraStream : TmdbProvider() {
{ {
invokeSoraStream( invokeSoraStream(
res.title, res.title,
res.isAnime,
res.year, res.year,
res.season, res.season,
res.episode, res.episode,