]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/migrations/peertube-4.2.ts
Translated using Weblate (Persian)
[github/Chocobozzz/PeerTube.git] / scripts / migrations / peertube-4.2.ts
index 22f9ff9f00ee37bf9b2e8dedb0f877743c74b8ac..513c629effe9af62d18a544636fa21165759be8e 100644 (file)
@@ -27,7 +27,7 @@ async function run () {
   console.log('Generate avatar miniatures from existing avatars.')
 
   await initDatabaseModels(true)
-  JobQueue.Instance.init(true)
+  JobQueue.Instance.init()
 
   const accounts: AccountModel[] = await AccountModel.findAll({
     include: [
@@ -59,6 +59,7 @@ async function run () {
 
     for (const videoChannel of account.VideoChannels) {
       try {
+        await fillAvatarSizeIfNeeded(videoChannel)
         await generateSmallerAvatarIfNeeded(videoChannel)
       } catch (err) {
         console.error(`Cannot process channel avatar ${videoChannel.name}`, err)
@@ -109,7 +110,7 @@ async function generateSmallerAvatar (actor: MActorDefault) {
   const source = join(CONFIG.STORAGE.ACTOR_IMAGES, sourceFilename)
   const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, newImageName)
 
-  await processImage(source, destination, imageSize, true)
+  await processImage({ path: source, destination, newSize: imageSize, keepOriginal: true })
 
   const actorImageInfo = {
     name: newImageName,