diff options
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r-- | server/models/video/video-file.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts index e3fa2f3d2..22cf63804 100644 --- a/server/models/video/video-file.ts +++ b/server/models/video/video-file.ts | |||
@@ -402,6 +402,10 @@ export class VideoFileModel extends Model<Partial<AttributesOnly<VideoFileModel> | |||
402 | return VideoFileModel.destroy(options) | 402 | return VideoFileModel.destroy(options) |
403 | } | 403 | } |
404 | 404 | ||
405 | hasTorrent () { | ||
406 | return this.infoHash && this.torrentFilename | ||
407 | } | ||
408 | |||
405 | getVideoOrStreamingPlaylist (this: MVideoFileVideo | MVideoFileStreamingPlaylistVideo): MVideo | MStreamingPlaylistVideo { | 409 | getVideoOrStreamingPlaylist (this: MVideoFileVideo | MVideoFileStreamingPlaylistVideo): MVideo | MStreamingPlaylistVideo { |
406 | if (this.videoId) return (this as MVideoFileVideo).Video | 410 | if (this.videoId) return (this as MVideoFileVideo).Video |
407 | 411 | ||