aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-11 11:23:51 +0200
committerChocobozzz <me@florianbigard.com>2023-07-11 11:23:51 +0200
commitd732ec7b46caa2a0972f132894023fec6bc5dd6a (patch)
tree907e012702e575acdab37a41b28d62c468fa1312 /scripts
parent76824f522addf310a829ec71fbd2230b7be5d61c (diff)
downloadPeerTube-d732ec7b46caa2a0972f132894023fec6bc5dd6a.tar.gz
PeerTube-d732ec7b46caa2a0972f132894023fec6bc5dd6a.tar.zst
PeerTube-d732ec7b46caa2a0972f132894023fec6bc5dd6a.zip
Rename "videos" config to "web-videos"
Diffstat (limited to 'scripts')
-rw-r--r--scripts/migrations/peertube-4.2.ts6
-rwxr-xr-xscripts/prune-storage.ts2
2 files changed, 4 insertions, 4 deletions
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
78 78
79 console.log('Filling size of avatars of %s.', accountOrChannel.name) 79 console.log('Filling size of avatars of %s.', accountOrChannel.name)
80 80
81 const { width, height } = await getImageSize(join(CONFIG.STORAGE.ACTOR_IMAGES, avatar.filename)) 81 const { width, height } = await getImageSize(join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, avatar.filename))
82 avatar.width = width 82 avatar.width = width
83 avatar.height = height 83 avatar.height = height
84 84
@@ -107,8 +107,8 @@ async function generateSmallerAvatar (actor: MActorDefault) {
107 const sourceFilename = bigAvatar.filename 107 const sourceFilename = bigAvatar.filename
108 108
109 const newImageName = buildUUID() + getLowercaseExtension(sourceFilename) 109 const newImageName = buildUUID() + getLowercaseExtension(sourceFilename)
110 const source = join(CONFIG.STORAGE.ACTOR_IMAGES, sourceFilename) 110 const source = join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, sourceFilename)
111 const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, newImageName) 111 const destination = join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, newImageName)
112 112
113 await processImage({ path: source, destination, newSize: imageSize, keepOriginal: true }) 113 await processImage({ path: source, destination, newSize: imageSize, keepOriginal: true })
114 114
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 () {
50 await pruneDirectory(CONFIG.STORAGE.PREVIEWS_DIR, doesThumbnailExist(true, ThumbnailType.PREVIEW)), 50 await pruneDirectory(CONFIG.STORAGE.PREVIEWS_DIR, doesThumbnailExist(true, ThumbnailType.PREVIEW)),
51 await pruneDirectory(CONFIG.STORAGE.THUMBNAILS_DIR, doesThumbnailExist(false, ThumbnailType.MINIATURE)), 51 await pruneDirectory(CONFIG.STORAGE.THUMBNAILS_DIR, doesThumbnailExist(false, ThumbnailType.MINIATURE)),
52 52
53 await pruneDirectory(CONFIG.STORAGE.ACTOR_IMAGES, doesActorImageExist) 53 await pruneDirectory(CONFIG.STORAGE.ACTOR_IMAGES_DIR, doesActorImageExist)
54 ) 54 )
55 55
56 const tmpFiles = await readdir(CONFIG.STORAGE.TMP_DIR) 56 const tmpFiles = await readdir(CONFIG.STORAGE.TMP_DIR)