aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-file.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r--server/models/video/video-file.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index 1ad796104..0b5946149 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -401,6 +401,10 @@ export class VideoFileModel extends Model {
401 return VideoFileModel.destroy(options) 401 return VideoFileModel.destroy(options)
402 } 402 }
403 403
404 hasTorrent () {
405 return this.infoHash && this.torrentFilename
406 }
407
404 getVideoOrStreamingPlaylist (this: MVideoFileVideo | MVideoFileStreamingPlaylistVideo): MVideo | MStreamingPlaylistVideo { 408 getVideoOrStreamingPlaylist (this: MVideoFileVideo | MVideoFileStreamingPlaylistVideo): MVideo | MStreamingPlaylistVideo {
405 if (this.videoId) return (this as MVideoFileVideo).Video 409 if (this.videoId) return (this as MVideoFileVideo).Video
406 410