mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Add a video field to the identify
This commit is contained in:
parent
9a125e0359
commit
98f6fda99f
@ -1,16 +1,30 @@
|
||||
use serde::Serialize;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::transcode::Quality;
|
||||
|
||||
#[derive(Serialize, ToSchema)]
|
||||
pub struct MediaInfo {
|
||||
/// The length of the media in seconds.
|
||||
length: f32,
|
||||
container: String,
|
||||
video_codec: String,
|
||||
video: VideoTrack,
|
||||
audios: Vec<Track>,
|
||||
subtitles: Vec<Track>,
|
||||
fonts: Vec<String>,
|
||||
chapters: Vec<Chapter>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, ToSchema)]
|
||||
pub struct VideoTrack {
|
||||
/// The codec of this stream.
|
||||
codec: String,
|
||||
/// The language of this stream (as a ISO-639-2 language code)
|
||||
language: String,
|
||||
/// The max quality of this video track.
|
||||
quality: Quality,
|
||||
}
|
||||
|
||||
#[derive(Serialize, ToSchema)]
|
||||
pub struct Track {
|
||||
/// The index of this track on the media.
|
||||
|
Loading…
x
Reference in New Issue
Block a user