Only create refresh job if needed

This commit is contained in:
Chocobozzz
2019-03-19 11:14:48 +01:00
parent f4800714f9
commit f58094b257

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,