From d732ec7b46caa2a0972f132894023fec6bc5dd6a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jul 2023 11:23:51 +0200 Subject: Rename "videos" config to "web-videos" --- scripts/migrations/peertube-4.2.ts | 6 +++--- scripts/prune-storage.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/migrations/peertube-4.2.ts b/scripts/migrations/peertube-4.2.ts index 513c629ef..d8929692b 100644 --- a/scripts/migrations/peertube-4.2.ts +++ b/scripts/migrations/peertube-4.2.ts @@ -78,7 +78,7 @@ async function fillAvatarSizeIfNeeded (accountOrChannel: MAccountDefault | MChan console.log('Filling size of avatars of %s.', accountOrChannel.name) - const { width, height } = await getImageSize(join(CONFIG.STORAGE.ACTOR_IMAGES, avatar.filename)) + const { width, height } = await getImageSize(join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, avatar.filename)) avatar.width = width avatar.height = height @@ -107,8 +107,8 @@ async function generateSmallerAvatar (actor: MActorDefault) { const sourceFilename = bigAvatar.filename const newImageName = buildUUID() + getLowercaseExtension(sourceFilename) - const source = join(CONFIG.STORAGE.ACTOR_IMAGES, sourceFilename) - const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, newImageName) + const source = join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, sourceFilename) + const destination = join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, newImageName) await processImage({ path: source, destination, newSize: imageSize, keepOriginal: true }) diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts index 8d1ded59b..9a73a8600 100755 --- a/scripts/prune-storage.ts +++ b/scripts/prune-storage.ts @@ -50,7 +50,7 @@ async function run () { await pruneDirectory(CONFIG.STORAGE.PREVIEWS_DIR, doesThumbnailExist(true, ThumbnailType.PREVIEW)), await pruneDirectory(CONFIG.STORAGE.THUMBNAILS_DIR, doesThumbnailExist(false, ThumbnailType.MINIATURE)), - await pruneDirectory(CONFIG.STORAGE.ACTOR_IMAGES, doesActorImageExist) + await pruneDirectory(CONFIG.STORAGE.ACTOR_IMAGES_DIR, doesActorImageExist) ) const tmpFiles = await readdir(CONFIG.STORAGE.TMP_DIR) -- cgit v1.2.3