teapod/app/src/main/java/org/mosad/teapod/util/DataTypes.kt

53 lines
1.1 KiB
Kotlin
Raw Normal View History

2020-10-08 22:20:20 +02:00
package org.mosad.teapod.util
class DataTypes {
enum class MediaType {
OTHER,
MOVIE,
TVSHOW
}
}
// TODO the episodes workflow could use a clean up/rework
data class Media(
val title: String,
val link: String,
val type: DataTypes.MediaType,
val info: Info = Info(),
var episodes: List<Episode> = listOf()
) {
2020-10-11 18:07:00 +02:00
override fun toString(): String {
return title
}
}
2020-10-13 16:30:23 +02:00
data class Info(
var posterLink: String = "",
var shortDesc: String = "",
var description: String = "",
var year: Int = 0,
var age: Int = 0,
var episodesCount: Int = 0
)
2020-10-13 16:30:23 +02:00
data class Episode(
val id: Int = 0,
var title: String = "",
var streamUrl: String = "",
var posterLink: String = "",
2020-10-13 16:30:23 +02:00
var description: String = "",
var shortDesc: String = "",
2020-10-13 16:30:23 +02:00
var number: Int = 0,
2020-10-13 23:47:48 +02:00
var watched: Boolean = false,
var watchedCallback: String = ""
2020-10-13 16:30:23 +02:00
)
2020-10-13 16:30:23 +02:00
data class TMDBResponse(
val id: Int = 0,
val title: String = "",
val overview: String = "",
val posterUrl: String = "",
val backdropUrl: String = "",
var runtime: Int = 0
)