X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fplugins%2Fplugin-helpers-builder.ts;h=b76c0a8a4894ba46bc0c3a6a00a9c1e6baa8e651;hb=4fae2b1f300c1f027629569817262f60873a663a;hp=78e4a28ad6447cc11971903ab1680e3d9cc50746;hpb=754c52b9b998a825fd830d5ac527a67e0eefeb9a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/plugins/plugin-helpers-builder.ts b/server/lib/plugins/plugin-helpers-builder.ts index 78e4a28ad..b76c0a8a4 100644 --- a/server/lib/plugins/plugin-helpers-builder.ts +++ b/server/lib/plugins/plugin-helpers-builder.ts @@ -1,6 +1,6 @@ import express from 'express' import { join } from 'path' -import { ffprobePromise } from '@server/helpers/ffprobe-utils' +import { ffprobePromise } from '@server/helpers/ffmpeg/ffprobe-utils' import { buildLogger } from '@server/helpers/logger' import { CONFIG } from '@server/initializers/config' import { WEBSERVER } from '@server/initializers/constants' @@ -83,7 +83,7 @@ function buildVideosHelpers () { removeVideo: (id: number) => { return sequelizeTypescript.transaction(async t => { - const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(id, t) + const video = await VideoModel.loadFull(id, t) await video.destroy({ transaction: t }) }) @@ -94,7 +94,7 @@ function buildVideosHelpers () { }, getFiles: async (id: number | string) => { - const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(id) + const video = await VideoModel.loadFull(id) if (!video) return undefined const webtorrentVideoFiles = (video.VideoFiles || []).map(f => ({ @@ -178,14 +178,14 @@ function buildModerationHelpers () { }, blacklistVideo: async (options: { videoIdOrUUID: number | string, createOptions: VideoBlacklistCreate }) => { - const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(options.videoIdOrUUID) + const video = await VideoModel.loadFull(options.videoIdOrUUID) if (!video) return await blacklistVideo(video, options.createOptions) }, unblacklistVideo: async (options: { videoIdOrUUID: number | string }) => { - const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(options.videoIdOrUUID) + const video = await VideoModel.loadFull(options.videoIdOrUUID) if (!video) return const videoBlacklist = await VideoBlacklistModel.loadByVideoId(video.id)