]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-file.ts
Merge branch 'release/3.2.0' into develop
[github/Chocobozzz/PeerTube.git] / server / models / video / video-file.ts
index e3fa2f3d255cb3a4f5695a7118904ba3cdd00c86..22cf638046afb6e3fb1ee0bf2e33285cc5484859 100644 (file)
@@ -402,6 +402,10 @@ export class VideoFileModel extends Model<Partial<AttributesOnly<VideoFileModel>
     return VideoFileModel.destroy(options)
   }
 
+  hasTorrent () {
+    return this.infoHash && this.torrentFilename
+  }
+
   getVideoOrStreamingPlaylist (this: MVideoFileVideo | MVideoFileStreamingPlaylistVideo): MVideo | MStreamingPlaylistVideo {
     if (this.videoId) return (this as MVideoFileVideo).Video