mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 12:14:46 -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 serde::Serialize;
|
||||||
use utoipa::ToSchema;
|
use utoipa::ToSchema;
|
||||||
|
|
||||||
|
use crate::transcode::Quality;
|
||||||
|
|
||||||
#[derive(Serialize, ToSchema)]
|
#[derive(Serialize, ToSchema)]
|
||||||
pub struct MediaInfo {
|
pub struct MediaInfo {
|
||||||
|
/// The length of the media in seconds.
|
||||||
|
length: f32,
|
||||||
container: String,
|
container: String,
|
||||||
video_codec: String,
|
video: VideoTrack,
|
||||||
audios: Vec<Track>,
|
audios: Vec<Track>,
|
||||||
subtitles: Vec<Track>,
|
subtitles: Vec<Track>,
|
||||||
fonts: Vec<String>,
|
fonts: Vec<String>,
|
||||||
chapters: Vec<Chapter>,
|
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)]
|
#[derive(Serialize, ToSchema)]
|
||||||
pub struct Track {
|
pub struct Track {
|
||||||
/// The index of this track on the media.
|
/// The index of this track on the media.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user