1use flix_model::id::{CollectionId, MovieId, ShowId};
7use flix_model::numbers::{EpisodeNumbers, SeasonNumber};
8
9pub mod library;
10
11pub mod generic;
12
13pub mod collection;
14
15pub mod movie;
16
17pub mod episode;
18pub mod season;
19pub mod show;
20
21#[derive(Debug, Clone)]
23pub enum MediaRef<ID> {
24 Id(ID),
26 Slug(String),
28}
29
30#[derive(Debug)]
32pub struct CollectionScan {
33 pub parent_ref: Option<MediaRef<CollectionId>>,
35 pub id_ref: MediaRef<CollectionId>,
37 pub poster_file_name: Option<String>,
39}
40
41#[derive(Debug)]
43pub struct MovieScan {
44 pub parent_ref: Option<MediaRef<CollectionId>>,
46 pub id_ref: MediaRef<MovieId>,
48 pub media_file_name: String,
50 pub poster_file_name: Option<String>,
52}
53
54#[derive(Debug)]
56pub struct ShowScan {
57 pub parent_ref: Option<MediaRef<CollectionId>>,
59 pub id_ref: MediaRef<ShowId>,
61 pub poster_file_name: Option<String>,
63}
64
65#[derive(Debug)]
67pub struct SeasonScan {
68 pub show_ref: MediaRef<ShowId>,
70 pub season: SeasonNumber,
72 pub poster_file_name: Option<String>,
74}
75
76#[derive(Debug)]
78pub struct EpisodeScan {
79 pub show_ref: MediaRef<ShowId>,
81 pub season: SeasonNumber,
83 pub episode: EpisodeNumbers,
85 pub media_file_name: String,
87 pub poster_file_name: Option<String>,
89}