X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo.ts;h=2bfa704ec5229eea4576186d5a45e57197128112;hb=24516aa26a6753517b379cf7b5104c1a24eccad6;hp=3db6549ae58c857eeb496525502547010c4f461f;hpb=3b01f4c0ac764ecb70efaadfd939ca868c28769c;p=github%2FChocobozzz%2FPeerTube.git 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)