allow episode in title if no other characters

This commit is contained in:
Finnley Somdahl 2024-01-12 21:00:05 -06:00
parent 419d33a3ac
commit 1ba67280a6
4 changed files with 11 additions and 9 deletions

View file

@ -29,5 +29,12 @@ class AnimeNameAdapter {
null
}
}
fun removeEpisodeNumber(text: String): String {
val regexPattern = Regex(episodeRegex, RegexOption.IGNORE_CASE)
return text.replace(regexPattern, "").ifEmpty {
text
}
}
}
}