Only create refresh job if needed

pull/1745/head
Chocobozzz 2019-03-19 11:14:48 +01:00
parent f4800714f9
commit f58094b257
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 2 deletions

View File

@ -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,