]>
Commit | Line | Data |
---|---|---|
1 | import { FfprobeData } from "fluent-ffmpeg" | |
2 | import { DeepOmit } from "@server/models/utils" | |
3 | ||
4 | export type VideoFileMetadataModel = DeepOmit<FfprobeData, 'filename'> | |
5 | ||
6 | export class VideoFileMetadata implements VideoFileMetadataModel { | |
7 | streams: { [x: string]: any, [x: number]: any }[] | |
8 | format: { [x: string]: any, [x: number]: any } | |
9 | chapters: any[] | |
10 | ||
11 | constructor (hash: Partial<VideoFileMetadataModel>) { | |
12 | this.chapters = hash.chapters | |
13 | this.format = hash.format | |
14 | this.streams = hash.streams | |
15 | ||
16 | delete this.format.filename | |
17 | } | |
18 | } |