]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/lazy-static.ts
Add video edition finished notification
[github/Chocobozzz/PeerTube.git] / server / controllers / lazy-static.ts
index 9a7dacba049e86d3eb546dcc4bc91369ff591333..55bf026601750d99beeb718f6bb6da695bf5c658 100644 (file)
@@ -1,7 +1,7 @@
-import * as cors from 'cors'
-import * as express from 'express'
+import cors from 'cors'
+import express from 'express'
 import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache'
-import { HttpStatusCode } from '../../shared/core-utils/miscs/http-error-codes'
+import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
 import { logger } from '../helpers/logger'
 import { LAZY_STATIC_PATHS, STATIC_MAX_AGE } from '../initializers/constants'
 import { VideosCaptionCache, VideosPreviewCache } from '../lib/files-cache'
@@ -64,7 +64,15 @@ async function getActorImage (req: express.Request, res: express.Response, next:
     logger.info('Lazy serve remote actor image %s.', image.fileUrl)
 
     try {
-      await pushActorImageProcessInQueue({ filename: image.filename, fileUrl: image.fileUrl, type: image.type })
+      await pushActorImageProcessInQueue({
+        filename: image.filename,
+        fileUrl: image.fileUrl,
+        size: {
+          height: image.height,
+          width: image.width
+        },
+        type: image.type
+      })
     } catch (err) {
       logger.warn('Cannot process remote actor image %s.', image.fileUrl, { err })
       return res.status(HttpStatusCode.NOT_FOUND_404).end()