projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f480071
)
Only create refresh job if needed
author
Chocobozzz
<me@florianbigard.com>
Tue, 19 Mar 2019 10:14:48 +0000
(11:14 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Tue, 19 Mar 2019 10:14:48 +0000
(11:14 +0100)
server/lib/activitypub/videos.ts
patch
|
blob
|
history
diff --git
a/server/lib/activitypub/videos.ts
b/server/lib/activitypub/videos.ts
index 9ca0502a406ec0cafcc4511dd187a25f85b78a10..66d0abf359ce35e97b4e2cc698cc3b969a78a5fb 100644
(file)
--- 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,