aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-25 11:33:26 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-01-25 14:38:52 +0100
commit6939cbac48e0a9823b34577836480ae3c28186be (patch)
tree9ee44d4d26931ee0550121acd4f19e83b4c5caf3 /server/models/video
parent77d7e851dccf17dcc89e8fcc2db3f655d1e63f95 (diff)
downloadPeerTube-6939cbac48e0a9823b34577836480ae3c28186be.tar.gz
PeerTube-6939cbac48e0a9823b34577836480ae3c28186be.tar.zst
PeerTube-6939cbac48e0a9823b34577836480ae3c28186be.zip
Safely remove webtorrent files
Only remove them on max quality HLS playlist generation
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 720bfd829..343abde44 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1804,6 +1804,10 @@ export class VideoModel extends Model {
1804 return Object.assign(file, { Video: this }) 1804 return Object.assign(file, { Video: this })
1805 } 1805 }
1806 1806
1807 hasWebTorrentFiles () {
1808 return Array.isArray(this.VideoFiles) === true && this.VideoFiles.length !== 0
1809 }
1810
1807 async addAndSaveThumbnail (thumbnail: MThumbnail, transaction: Transaction) { 1811 async addAndSaveThumbnail (thumbnail: MThumbnail, transaction: Transaction) {
1808 thumbnail.videoId = this.id 1812 thumbnail.videoId = this.id
1809 1813