mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Add extension on the transcoder info
This commit is contained in:
parent
dd62f8f8ac
commit
2603c1b29d
@ -110,6 +110,10 @@ export const WatchInfoP = z.object({
|
||||
* The internal path of the video file.
|
||||
*/
|
||||
path: z.string(),
|
||||
/**
|
||||
* The extension used to store this video file.
|
||||
*/
|
||||
extension: z.string(),
|
||||
/**
|
||||
* The container of the video file of this episode. Common containers are mp4, mkv, avi and so on.
|
||||
*/
|
||||
|
@ -20,6 +20,8 @@ pub struct MediaInfo {
|
||||
pub sha: String,
|
||||
/// The internal path of the video file.
|
||||
pub path: String,
|
||||
/// The extension currently used to store this video file
|
||||
pub extension: String,
|
||||
/// The length of the media in seconds.
|
||||
pub length: f32,
|
||||
/// The container of the video file of this episode.
|
||||
@ -203,6 +205,7 @@ pub async fn identify(path: String) -> Option<MediaInfo> {
|
||||
|
||||
Some(MediaInfo {
|
||||
length: parse::<f32>(&general["Duration"])?,
|
||||
extension: Path::new(path).extension(),
|
||||
container: general["Format"].as_str().unwrap().to_string(),
|
||||
video: {
|
||||
let v = output["media"]["track"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user