aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-25 14:18:59 +0200
committerChocobozzz <me@florianbigard.com>2022-10-25 14:18:59 +0200
commitaa887096f9a305568dc3a846d0c9cdf7e45f1c67 (patch)
tree5dc455d680ebdd24644ebe29b2f129afb903b421 /server/models/video/video.ts
parent508c1b1e9f3b26752a961e945b7fa59b72b30827 (diff)
downloadPeerTube-aa887096f9a305568dc3a846d0c9cdf7e45f1c67.tar.gz
PeerTube-aa887096f9a305568dc3a846d0c9cdf7e45f1c67.tar.zst
PeerTube-aa887096f9a305568dc3a846d0c9cdf7e45f1c67.zip
Correctly delete live files from object storage
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 9399712b8..2ff92cbf1 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -26,7 +26,7 @@ import {
26} from 'sequelize-typescript' 26} from 'sequelize-typescript'
27import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video' 27import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video'
28import { LiveManager } from '@server/lib/live/live-manager' 28import { LiveManager } from '@server/lib/live/live-manager'
29import { removeHLSFileObjectStorage, removeHLSObjectStorage, removeWebTorrentObjectStorage } from '@server/lib/object-storage' 29import { removeHLSFileObjectStorageByFilename, removeHLSObjectStorage, removeWebTorrentObjectStorage } from '@server/lib/object-storage'
30import { tracer } from '@server/lib/opentelemetry/tracing' 30import { tracer } from '@server/lib/opentelemetry/tracing'
31import { getHLSDirectory, getHLSRedundancyDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths' 31import { getHLSDirectory, getHLSRedundancyDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths'
32import { VideoPathManager } from '@server/lib/video-path-manager' 32import { VideoPathManager } from '@server/lib/video-path-manager'
@@ -1830,8 +1830,8 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1830 await remove(VideoPathManager.Instance.getFSHLSOutputPath(this, resolutionFilename)) 1830 await remove(VideoPathManager.Instance.getFSHLSOutputPath(this, resolutionFilename))
1831 1831
1832 if (videoFile.storage === VideoStorage.OBJECT_STORAGE) { 1832 if (videoFile.storage === VideoStorage.OBJECT_STORAGE) {
1833 await removeHLSFileObjectStorage(streamingPlaylist.withVideo(this), videoFile.filename) 1833 await removeHLSFileObjectStorageByFilename(streamingPlaylist.withVideo(this), videoFile.filename)
1834 await removeHLSFileObjectStorage(streamingPlaylist.withVideo(this), resolutionFilename) 1834 await removeHLSFileObjectStorageByFilename(streamingPlaylist.withVideo(this), resolutionFilename)
1835 } 1835 }
1836 } 1836 }
1837 1837
@@ -1840,7 +1840,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1840 await remove(filePath) 1840 await remove(filePath)
1841 1841
1842 if (streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) { 1842 if (streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) {
1843 await removeHLSFileObjectStorage(streamingPlaylist.withVideo(this), filename) 1843 await removeHLSFileObjectStorageByFilename(streamingPlaylist.withVideo(this), filename)
1844 } 1844 }
1845 } 1845 }
1846 1846