1
0
Fork 0

Only create refresh job if needed

This commit is contained in:
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

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,