File size: 960 Bytes
3374e90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::media::LinkedId;

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct SubtitleQuery {
    pub title: Option<String>, pub year: Option<u32>,
    pub season: Option<u32>, pub episode: Option<u32>,
    pub language: Option<String>, pub fps: Option<f32>,
    pub file_hash: Option<String>, pub file_size: Option<u64>,
    pub identifiers: Vec<LinkedId>,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct SubtitleEntry {
    pub id: String, pub title: String, pub language: String,
    pub format: String, pub url: Option<String>,
    pub release: Option<String>, pub fps: Option<f32>,
    pub downloads: Option<u64>, pub score: Option<u32>,
    pub hearing_impaired: bool, pub machine_translated: bool,
    pub file_hash: Option<String>, pub extra: Vec<(String, String)>,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct SubtitleFile { pub format: String, pub content: Vec<u8> }