diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-17 16:04:53 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-18 09:04:30 +0100 |
commit | b46cf4b920984492df598c1b61179acfc7f6f22e (patch) | |
tree | 21fda049c85be48ab3d37b537aafa98e94649ad7 /server/models/video | |
parent | 3cfa817672657df18260ece5b354efa0f3b6e317 (diff) | |
download | PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.tar.gz PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.tar.zst PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.zip |
Add ability to remove hls/webtorrent files
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 69d009e04..6eeb6b312 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -746,7 +746,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> { | |||
746 | 746 | ||
747 | // Remove physical files and torrents | 747 | // Remove physical files and torrents |
748 | instance.VideoFiles.forEach(file => { | 748 | instance.VideoFiles.forEach(file => { |
749 | tasks.push(instance.removeFileAndTorrent(file)) | 749 | tasks.push(instance.removeWebTorrentFileAndTorrent(file)) |
750 | }) | 750 | }) |
751 | 751 | ||
752 | // Remove playlists file | 752 | // Remove playlists file |
@@ -1706,7 +1706,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> { | |||
1706 | .concat(toAdd) | 1706 | .concat(toAdd) |
1707 | } | 1707 | } |
1708 | 1708 | ||
1709 | removeFileAndTorrent (videoFile: MVideoFile, isRedundancy = false) { | 1709 | removeWebTorrentFileAndTorrent (videoFile: MVideoFile, isRedundancy = false) { |
1710 | const filePath = isRedundancy | 1710 | const filePath = isRedundancy |
1711 | ? VideoPathManager.Instance.getFSRedundancyVideoFilePath(this, videoFile) | 1711 | ? VideoPathManager.Instance.getFSRedundancyVideoFilePath(this, videoFile) |
1712 | : VideoPathManager.Instance.getFSVideoFileOutputPath(this, videoFile) | 1712 | : VideoPathManager.Instance.getFSVideoFileOutputPath(this, videoFile) |