constructor for backwards compatibility

This commit is contained in:
KingLucius 2024-05-06 08:31:26 +03:00
parent e40f1df2a2
commit 12575be227
1 changed files with 14 additions and 2 deletions

View File

@ -1448,12 +1448,24 @@ fun TvType?.isEpisodeBased(): Boolean {
return (this == TvType.TvSeries || this == TvType.Anime || this == TvType.AsianDrama)
}
data class NextAiring(
val episode: Int,
val unixTime: Long,
val season: Int? = null,
)
) {
/**
* Secondary constructor for backwards compatibility without season.
* TODO Remove this constructor after there is a new stable release and extensions are updated to support season.
*/
constructor(
episode: Int,
unixTime: Long,
) : this (
episode,
unixTime,
null
)
}
/**
* @param season To be mapped with episode season, not shown in UI if displaySeason is defined