X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fmigrations%2Fpeertube-4.2.ts;h=513c629effe9af62d18a544636fa21165759be8e;hb=118626c8752bee7b05c4e0b668852e1aba2416f1;hp=22f9ff9f00ee37bf9b2e8dedb0f877743c74b8ac;hpb=28dca0a2211524bbf3ad17666c607eb6325763b8;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/migrations/peertube-4.2.ts b/scripts/migrations/peertube-4.2.ts index 22f9ff9f0..513c629ef 100644 --- a/scripts/migrations/peertube-4.2.ts +++ b/scripts/migrations/peertube-4.2.ts @@ -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,