Update MainAPI.kt

This commit is contained in:
Jace 2023-07-26 12:01:17 +08:00 committed by GitHub
parent 250b61c517
commit 39bc4f411d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -801,6 +801,18 @@ enum class TvType(value: Int?) {
Others(12) Others(12)
} }
public enum class AutoDownloadMode(val value: Int) {
Disable(0),
FilterByLang(1),
All(2),
NsfwOnly(3)
;
companion object {
infix fun getEnum(value: Int): AutoDownloadMode? = AutoDownloadMode.values().firstOrNull { it.value == value }
}
}
// IN CASE OF FUTURE ANIME MOVIE OR SMTH // IN CASE OF FUTURE ANIME MOVIE OR SMTH
fun TvType.isMovieType(): Boolean { fun TvType.isMovieType(): Boolean {
return this == TvType.Movie || this == TvType.AnimeMovie || this == TvType.Torrent || this == TvType.Live return this == TvType.Movie || this == TvType.AnimeMovie || this == TvType.Torrent || this == TvType.Live