feat(core): add TV domain types
This commit is contained in:
@@ -21,6 +21,9 @@ macro_rules! id_type {
|
||||
id_type!(RootId);
|
||||
id_type!(PolicyId);
|
||||
id_type!(MovieId);
|
||||
id_type!(SeriesId);
|
||||
id_type!(SeasonId);
|
||||
id_type!(EpisodeId);
|
||||
id_type!(MediaFileId);
|
||||
id_type!(ReleaseId);
|
||||
id_type!(GrabId);
|
||||
@@ -183,6 +186,53 @@ pub struct Movie {
|
||||
pub last_searched_at: Option<SystemTime>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Eq, PartialEq)]
|
||||
pub struct SeriesOverrides {
|
||||
pub only_4k: bool,
|
||||
pub allow_english_audio: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Series {
|
||||
pub id: SeriesId,
|
||||
pub tmdb_id: u64,
|
||||
pub title: String,
|
||||
pub year: u16,
|
||||
pub original_language: Language,
|
||||
pub root_id: RootId,
|
||||
pub auto_track: bool,
|
||||
pub overrides: SeriesOverrides,
|
||||
pub blocked: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Season {
|
||||
pub id: SeasonId,
|
||||
pub series_id: SeriesId,
|
||||
pub number: u16,
|
||||
pub tracked: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum EpisodeState {
|
||||
Missing,
|
||||
Downloading,
|
||||
Available,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Episode {
|
||||
pub id: EpisodeId,
|
||||
pub season_id: SeasonId,
|
||||
pub number: u16,
|
||||
pub title: String,
|
||||
pub air_date: Option<SystemTime>,
|
||||
pub wanted: bool,
|
||||
pub state: EpisodeState,
|
||||
pub search_attempts: u32,
|
||||
pub last_searched_at: Option<SystemTime>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct AudioTrack {
|
||||
pub language: Language,
|
||||
|
||||
Reference in New Issue
Block a user