From 754c52b9b998a825fd830d5ac527a67e0eefeb9a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 16 Dec 2021 17:00:46 +0100 Subject: Add ffprobe helper --- server/lib/plugins/plugin-helpers-builder.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/lib') diff --git a/server/lib/plugins/plugin-helpers-builder.ts b/server/lib/plugins/plugin-helpers-builder.ts index bea0f8959..78e4a28ad 100644 --- a/server/lib/plugins/plugin-helpers-builder.ts +++ b/server/lib/plugins/plugin-helpers-builder.ts @@ -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 -- cgit v1.2.3