aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-19 11:14:48 +0100
committerChocobozzz <me@florianbigard.com>2019-03-19 11:14:48 +0100
commitf58094b2577afbd26bb2e74768938bcdd9890c16 (patch)
tree0f31f2e6319f4f772ff3ea961876f9b3d99ede15 /server
parentf4800714f906eabd1762d42179e538f5c4a11d68 (diff)
downloadPeerTube-f58094b2577afbd26bb2e74768938bcdd9890c16.tar.gz
PeerTube-f58094b2577afbd26bb2e74768938bcdd9890c16.tar.zst
PeerTube-f58094b2577afbd26bb2e74768938bcdd9890c16.zip
Only create refresh job if needed
Diffstat (limited to 'server')
-rw-r--r--server/lib/activitypub/videos.ts3
1 files changed, 1 insertions, 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: {
180 180
181 let videoFromDatabase = await fetchVideoByUrl(videoUrl, fetchType) 181 let videoFromDatabase = await fetchVideoByUrl(videoUrl, fetchType)
182 if (videoFromDatabase) { 182 if (videoFromDatabase) {
183 183 if (videoFromDatabase.isOutdated() && allowRefresh === true) {
184 if (allowRefresh === true) {
185 const refreshOptions = { 184 const refreshOptions = {
186 video: videoFromDatabase, 185 video: videoFromDatabase,
187 fetchedType: fetchType, 186 fetchedType: fetchType,