Episode

@Serializable
data class Episode(val id: String = "", val overview: String = "", val runtime: Int? = null, val number: Int = 0, val title: String = "", airDate: String? = null, val season: Int = 0, val image: String? = null, val rating: Double? = null) : Serializable(source)

Data class representing an episode of a TV show.

This class is serializable using both Kotlin serialization and Java serialization.

Constructors

Link copied to clipboard
constructor(id: String = "", overview: String = "", runtime: Int? = null, number: Int = 0, title: String = "", airDate: String? = null, season: Int = 0, image: String? = null, rating: Double? = null)

Properties

Link copied to clipboard
val id: String

The unique identifier of the episode.

Link copied to clipboard
@SerializedName(value = "still_path")
val image: String? = null

The path to an image associated with the episode (optional).

Link copied to clipboard
@SerializedName(value = "episode_number")
val number: Int = 0

The episode number within its season.

Link copied to clipboard

A brief summary of the episode.

Link copied to clipboard
@SerializedName(value = "vote_average")
val rating: Double? = null

The average rating of the episode (optional).

Link copied to clipboard

The formatted release date of the episode. Attempts to format the airDate and falls back to the original airDate or an empty string if formatting fails.

Link copied to clipboard
val runtime: Int? = null

The duration of the episode in minutes.

Link copied to clipboard
@SerializedName(value = "season_number")
val season: Int = 0

The season number the episode belongs to.

Link copied to clipboard
@SerializedName(value = "name")
val title: String

The title of the episode.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Checks if this episode is equal to another object.

Link copied to clipboard
open override fun hashCode(): Int

Calculates the hash code based on the episode's season, number, and ID.