From a3737cbf2b09d5ce75e50f333d989a6162b04720 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 1 Oct 2018 16:27:47 +0200 Subject: Fix video fps validator --- server/lib/activitypub/videos.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/lib/activitypub/videos.ts') diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index 34685b6b1..cd1bc4e06 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts @@ -455,11 +455,11 @@ async function videoActivityObjectToDBAttributes ( } } -function videoFileActivityUrlToDBAttributes (videoCreated: VideoModel, videoObject: VideoTorrentObject) { +function videoFileActivityUrlToDBAttributes (video: VideoModel, videoObject: VideoTorrentObject) { const fileUrls = videoObject.url.filter(u => isActivityVideoUrlObject(u)) as ActivityVideoUrlObject[] if (fileUrls.length === 0) { - throw new Error('Cannot find video files for ' + videoCreated.url) + throw new Error('Cannot find video files for ' + video.url) } const attributes: VideoFileModel[] = [] @@ -481,7 +481,7 @@ function videoFileActivityUrlToDBAttributes (videoCreated: VideoModel, videoObje infoHash: parsed.infoHash, resolution: fileUrl.height, size: fileUrl.size, - videoId: videoCreated.id, + videoId: video.id, fps: fileUrl.fps || -1 } as VideoFileModel attributes.push(attribute) -- cgit v1.2.3