From aa887096f9a305568dc3a846d0c9cdf7e45f1c67 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 25 Oct 2022 14:18:59 +0200 Subject: Correctly delete live files from object storage --- server/models/video/video.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/models') 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 { } from 'sequelize-typescript' import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video' import { LiveManager } from '@server/lib/live/live-manager' -import { removeHLSFileObjectStorage, removeHLSObjectStorage, removeWebTorrentObjectStorage } from '@server/lib/object-storage' +import { removeHLSFileObjectStorageByFilename, removeHLSObjectStorage, removeWebTorrentObjectStorage } from '@server/lib/object-storage' import { tracer } from '@server/lib/opentelemetry/tracing' import { getHLSDirectory, getHLSRedundancyDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths' import { VideoPathManager } from '@server/lib/video-path-manager' @@ -1830,8 +1830,8 @@ export class VideoModel extends Model>> { await remove(VideoPathManager.Instance.getFSHLSOutputPath(this, resolutionFilename)) if (videoFile.storage === VideoStorage.OBJECT_STORAGE) { - await removeHLSFileObjectStorage(streamingPlaylist.withVideo(this), videoFile.filename) - await removeHLSFileObjectStorage(streamingPlaylist.withVideo(this), resolutionFilename) + await removeHLSFileObjectStorageByFilename(streamingPlaylist.withVideo(this), videoFile.filename) + await removeHLSFileObjectStorageByFilename(streamingPlaylist.withVideo(this), resolutionFilename) } } @@ -1840,7 +1840,7 @@ export class VideoModel extends Model>> { await remove(filePath) if (streamingPlaylist.storage === VideoStorage.OBJECT_STORAGE) { - await removeHLSFileObjectStorage(streamingPlaylist.withVideo(this), filename) + await removeHLSFileObjectStorageByFilename(streamingPlaylist.withVideo(this), filename) } } -- cgit v1.2.3