aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 1050463d2..801e23f55 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1539,6 +1539,21 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1539 return this.VideoChannel.Account.Actor.Server?.isBlocked() || this.VideoChannel.Account.isBlocked() 1539 return this.VideoChannel.Account.Actor.Server?.isBlocked() || this.VideoChannel.Account.isBlocked()
1540 } 1540 }
1541 1541
1542 getAllFiles () {
1543 let files: MVideoFile[] = []
1544
1545 if (Array.isArray(this.VideoFiles)) {
1546 files = files.concat(this.VideoFiles)
1547 }
1548
1549 const hls = this.getHLSPlaylist()
1550 if (hls) {
1551 files = files.concat(hls.VideoFiles)
1552 }
1553
1554 return files
1555 }
1556
1542 getQualityFileBy<T extends MVideoWithFile> (this: T, fun: (files: MVideoFile[], it: (file: MVideoFile) => number) => MVideoFile) { 1557 getQualityFileBy<T extends MVideoWithFile> (this: T, fun: (files: MVideoFile[], it: (file: MVideoFile) => number) => MVideoFile) {
1543 // We first transcode to WebTorrent format, so try this array first 1558 // We first transcode to WebTorrent format, so try this array first
1544 if (Array.isArray(this.VideoFiles) && this.VideoFiles.length !== 0) { 1559 if (Array.isArray(this.VideoFiles) && this.VideoFiles.length !== 0) {