From 784e2ad5c34bcfef36a3f69e9e9acd7cbb3d6428 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jul 2023 09:21:13 +0200 Subject: Prefer web videos in favour of webtorrent --- scripts/prune-storage.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/prune-storage.ts') diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts index d19594a60..8d1ded59b 100755 --- a/scripts/prune-storage.ts +++ b/scripts/prune-storage.ts @@ -37,8 +37,8 @@ async function run () { console.log('Detecting files to remove, it could take a while...') toDelete = toDelete.concat( - await pruneDirectory(DIRECTORIES.VIDEOS.PUBLIC, doesWebTorrentFileExist()), - await pruneDirectory(DIRECTORIES.VIDEOS.PRIVATE, doesWebTorrentFileExist()), + await pruneDirectory(DIRECTORIES.VIDEOS.PUBLIC, doesWebVideoFileExist()), + await pruneDirectory(DIRECTORIES.VIDEOS.PRIVATE, doesWebVideoFileExist()), await pruneDirectory(DIRECTORIES.HLS_STREAMING_PLAYLIST.PRIVATE, doesHLSPlaylistExist()), await pruneDirectory(DIRECTORIES.HLS_STREAMING_PLAYLIST.PUBLIC, doesHLSPlaylistExist()), @@ -93,12 +93,12 @@ async function pruneDirectory (directory: string, existFun: ExistFun) { return toDelete } -function doesWebTorrentFileExist () { +function doesWebVideoFileExist () { return (filePath: string) => { // Don't delete private directory if (filePath === DIRECTORIES.VIDEOS.PRIVATE) return true - return VideoFileModel.doesOwnedWebTorrentVideoFileExist(basename(filePath)) + return VideoFileModel.doesOwnedWebVideoFileExist(basename(filePath)) } } -- cgit v1.2.3