From f58094b2577afbd26bb2e74768938bcdd9890c16 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 19 Mar 2019 11:14:48 +0100 Subject: [PATCH] Only create refresh job if needed --- server/lib/activitypub/videos.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index 9ca0502a4..66d0abf35 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts @@ -180,8 +180,7 @@ async function getOrCreateVideoAndAccountAndChannel (options: { let videoFromDatabase = await fetchVideoByUrl(videoUrl, fetchType) if (videoFromDatabase) { - - if (allowRefresh === true) { + if (videoFromDatabase.isOutdated() && allowRefresh === true) { const refreshOptions = { video: videoFromDatabase, fetchedType: fetchType,