From 24516aa26a6753517b379cf7b5104c1a24eccad6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 21 Jan 2021 15:58:17 +0100 Subject: Refactor transcoding job handlers --- server/models/video/video.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'server/models') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 3db6549ae..2bfa704ec 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -1735,6 +1735,7 @@ export class VideoModel extends Model { } getQualityFileBy (this: T, fun: (files: MVideoFile[], it: (file: MVideoFile) => number) => MVideoFile) { + // We first transcode to WebTorrent format, so try this array first if (Array.isArray(this.VideoFiles) && this.VideoFiles.length !== 0) { const file = fun(this.VideoFiles, file => file.resolution) -- cgit v1.2.3