Speed up videos indexation
authorChocobozzz <me@florianbigard.com>
Fri, 12 Jun 2020 08:54:56 +0000 (10:54 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 12 Jun 2020 14:27:41 +0000 (16:27 +0200)
And fetch video attributes after

server/lib/activitypub/process/process-create.ts

index f8f9b80c6d242153e98fa20589ecd0c229401064..5e737f49ea1c253840f5283edcc34761699e6c7f 100644 (file)
@@ -54,7 +54,8 @@ export {
 async function processCreateVideo (activity: ActivityCreate, notify: boolean) {
   const videoToCreateData = activity.object as VideoTorrentObject
 
-  const { video, created } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoToCreateData })
+  const syncParam = { likes: false, dislikes: false, shares: false, comments: false, thumbnail: true, refreshVideo: false }
+  const { video, created } = await getOrCreateVideoAndAccountAndChannel({ videoObject: videoToCreateData, syncParam })
 
   if (created && notify) Notifier.Instance.notifyOnNewVideoIfNeeded(video)