mirror of
https://github.com/recloudstream/cloudstream.git
synced 2025-05-17 19:25:55 +08:00
Add new TVTypes for generic Audio and Podcast (#1442)
* Add new TVTypes for generic Audio and Podcast * Use when
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user