package tv.tivilux.nativeplayer.model enum class ContentType { LIVE, MOVIE, SERIES, EPISODE } data class Credentials( val serverUrl: String, val username: String, val password: String, ) data class SessionInfo( val username: String = "", val status: String = "Active", val expiration: String = "", val maxConnections: Int = 0, val activeConnections: Int = 0, ) data class Category( val id: String, val name: String, ) : java.io.Serializable data class MediaEntry( val id: String, val type: ContentType, val name: String, val categoryId: String = "", val image: String = "", val extension: String = "", val epgChannelId: String = "", val number: Int = 0, val rating: String = "", val year: String = "", val plot: String = "", val seriesId: String = "", val season: Int = 0, val episodeNumber: Int = 0, val seriesName: String = "", val directSource: String = "", val addedEpoch: Long = 0L, ) : java.io.Serializable data class EpgProgram( val title: String, val description: String = "", val startEpoch: Long, val endEpoch: Long, ) : java.io.Serializable data class Episode( val id: String, val seriesId: String, val season: Int, val episodeNumber: Int, val name: String, val extension: String, val image: String = "", val plot: String = "", val duration: String = "", val releaseDate: String = "", ) data class MovieDetail( val movie: MediaEntry, val plot: String = "", val backdrop: String = "", val genre: String = "", val cast: String = "", val director: String = "", val releaseDate: String = "", val duration: String = "", val rating: String = "", ) data class SeasonInfo( val seasonNumber: Int, val name: String = "", val overview: String = "", val airDate: String = "", val episodeCount: Int = 0, ) data class SeriesDetail( val series: MediaEntry, val episodes: Map>, val seasons: Map = emptyMap(), val plot: String = "", val backdrop: String = "", val genre: String = "", val cast: String = "", val director: String = "", val releaseDate: String = "", val rating: String = "", ) data class HouseholdProfile( val id: String, val name: String, val avatarIndex: Int = 0, ) data class PlaybackProgress( val item: MediaEntry, val positionMs: Long, val durationMs: Long, val updatedAt: Long, val completed: Boolean = false, val nextItem: MediaEntry? = null, ) enum class SportLeague(val label: String) { ALL("All Sports"), NFL("NFL"), COLLEGE_FOOTBALL("College Football"), NBA("NBA"), WNBA("WNBA"), MLB("MLB"), NHL("NHL"), SOCCER("Soccer"), GOLF("Golf"), COMBAT("UFC / Boxing"), MOTORSPORTS("Motorsports"), TENNIS("Tennis"), COLLEGE_BASKETBALL("College Basketball"), PPV("PPV"), OTHER("Other Sports"), } data class SportsEvent( val id: String, val league: SportLeague, val title: String, val startEpoch: Long, val endEpoch: Long, val feeds: List, val description: String = "", // Optional official-schedule metadata. Provider-only events leave these blank. val awayTeam: String = "", val homeTeam: String = "", val awayAliases: List = emptyList(), val homeAliases: List = emptyList(), val awayLogo: String = "", val homeLogo: String = "", val awayScore: String = "", val homeScore: String = "", val awayRank: Int = 0, val homeRank: Int = 0, val status: String = "", val network: String = "", val venue: String = "", val official: Boolean = false, val completed: Boolean = false, ) { fun isLive(nowEpoch: Long): Boolean { val state = status.lowercase() if (completed || state.contains("final")) return false if (state.contains("live") || state.contains("in progress") || state.contains("halftime") || state.contains("quarter")) return true return nowEpoch in startEpoch until endEpoch } } data class SportsLeagueSummary( val league: SportLeague, val channelCount: Int, val eventCount: Int, val liveCount: Int, ) data class AppSettings( val guidePreview: Boolean = true, val guideAutoplayPreview: Boolean = false, val stayOnGuideAfterTune: Boolean = true, val showChannelNumbers: Boolean = true, val showChannelLogos: Boolean = true, val channelSort: String = "Provider", val favoriteChannelSort: String = "Provider", val favoritesFirst: Boolean = false, val highlightCurrentChannel: Boolean = true, val showProgramProgress: Boolean = true, val twoLineProgramTitles: Boolean = false, val highlightCurrentProgram: Boolean = true, val fullHeightTimeIndicator: Boolean = true, val showProgramDescriptions: Boolean = true, val guideDensity: String = "Comfortable", val guideFontSize: String = "Normal", val epgTimeOffsetHours: Int = 0, val preferHlsLive: Boolean = false, val bufferPreset: String = "Turbo", val autoplayNextEpisode: Boolean = true, val startOnLiveTv: Boolean = false, val remoteShortcutsEnabled: Boolean = true, val showFullscreenClock: Boolean = true, val fullscreenClockSize: String = "Medium", val fullscreenClockPosition: String = "Top Right", val colorTheme: String = "Original Gold", val customBackground: String = "#090B10", val customAccent: String = "#E8C38B", val customFocus: String = "#F3D6AB", )