diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-19 11:14:48 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-03-19 11:14:48 +0100 |
commit | f58094b2577afbd26bb2e74768938bcdd9890c16 (patch) | |
tree | 0f31f2e6319f4f772ff3ea961876f9b3d99ede15 /server/lib | |
parent | f4800714f906eabd1762d42179e538f5c4a11d68 (diff) | |
download | PeerTube-f58094b2577afbd26bb2e74768938bcdd9890c16.tar.gz PeerTube-f58094b2577afbd26bb2e74768938bcdd9890c16.tar.zst PeerTube-f58094b2577afbd26bb2e74768938bcdd9890c16.zip |
Only create refresh job if needed
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/videos.ts | 3 |
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, |