mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Only create refresh job if needed
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user