mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add ffprobe helper
This commit is contained in:
parent
2e9c7877eb
commit
754c52b9b9
4 changed files with 31 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
import express from 'express'
|
||||
import { join } from 'path'
|
||||
import { ffprobePromise } from '@server/helpers/ffprobe-utils'
|
||||
import { buildLogger } from '@server/helpers/logger'
|
||||
import { CONFIG } from '@server/initializers/config'
|
||||
import { WEBSERVER } from '@server/initializers/constants'
|
||||
|
@ -88,6 +89,10 @@ function buildVideosHelpers () {
|
|||
})
|
||||
},
|
||||
|
||||
ffprobe: (path: string) => {
|
||||
return ffprobePromise(path)
|
||||
},
|
||||
|
||||
getFiles: async (id: number | string) => {
|
||||
const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(id)
|
||||
if (!video) return undefined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue