]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/process/process-view.ts
Update ffmpeg static version for tests
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / process / process-view.ts
index efceb21a207f64ecef6184f40dec2d8e8f807208..84697673b6ee5f1359a0b3db9b17ae91a9e1aac2 100644 (file)
@@ -31,6 +31,10 @@ async function processCreateView (activity: ActivityView | ActivityCreate, byAct
   }
   const { video } = await getOrCreateVideoAndAccountAndChannel(options)
 
+  if (!video.isLive) {
+    await Redis.Instance.addVideoView(video.id)
+  }
+
   if (video.isOwned()) {
     // Our live manager will increment the counter and send the view to followers
     if (video.isLive) {
@@ -38,8 +42,6 @@ async function processCreateView (activity: ActivityView | ActivityCreate, byAct
       return
     }
 
-    await Redis.Instance.addVideoView(video.id)
-
     // Forward the view but don't resend the activity to the sender
     const exceptions = [ byActor ]
     await forwardVideoRelatedActivity(activity, undefined, exceptions, video)