Add new TVTypes for generic Audio and Podcast (#1442)

* Add new TVTypes for generic Audio and Podcast

* Use when
This commit is contained in:
Luna712
2024-12-31 10:01:41 -07:00
committed by GitHub
parent 2d89cfa888
commit 05ca01185d
3 changed files with 27 additions and 3 deletions

View File

@ -681,8 +681,11 @@ enum class TvType(value: Int?) {
Music(13),
AudioBook(14),
/** Wont load the built in player, make your own interaction */
/** Won't load the built in player, make your own interaction */
CustomMedia(15),
Audio(16),
Podcast(17),
}
public enum class AutoDownloadMode(val value: Int) {
@ -698,9 +701,24 @@ public enum class AutoDownloadMode(val value: Int) {
}
}
// IN CASE OF FUTURE ANIME MOVIE OR SMTH
fun TvType.isMovieType(): Boolean {
return this == TvType.Movie || this == TvType.AnimeMovie || this == TvType.Torrent || this == TvType.Live
return when (this) {
TvType.AnimeMovie,
TvType.Live,
TvType.Movie,
TvType.Torrent -> true
else -> false
}
}
fun TvType.isAudioType(): Boolean {
return when (this) {
TvType.Audio,
TvType.AudioBook,
TvType.Music,
TvType.Podcast -> true
else -> false
}
}
fun TvType.isLiveStream(): Boolean {