8319d6ae72
* Add video file metadata via ffprobe * Federate video file metadata * Add tests for file metadata generation * Complete tests for videoFile metadata federation * Lint migration and video-file for metadata * Objectify metadata from getter in ffmpeg-utils * Add metadataUrl to all videoFiles * Simplify metadata API middleware * Load playlist in videoFile when requesting metadata
18 lines
543 B
TypeScript
18 lines
543 B
TypeScript
import { FfprobeData } from "fluent-ffmpeg"
|
|
import { DeepOmit } from "@server/models/utils"
|
|
|
|
export type VideoFileMetadataModel = DeepOmit<FfprobeData, 'filename'>
|
|
|
|
export class VideoFileMetadata implements VideoFileMetadataModel {
|
|
streams: { [x: string]: any, [x: number]: any }[]
|
|
format: { [x: string]: any, [x: number]: any }
|
|
chapters: any[]
|
|
|
|
constructor (hash: Partial<VideoFileMetadataModel>) {
|
|
this.chapters = hash.chapters
|
|
this.format = hash.format
|
|
this.streams = hash.streams
|
|
|
|
delete this.format.filename
|
|
}
|
|
}
|