- return new Promise(async res => {
- log.debug('Fetching object.', youtubeInfo)
-
- const videoInfo = await fetchObject(youtubeInfo)
- log.debug('Fetched object.', videoInfo)
-
- const originallyPublishedAt = buildOriginallyPublishedAt(videoInfo)
-
- if (program['since'] && originallyPublishedAt && originallyPublishedAt.getTime() < program['since'].getTime()) {
- log.info('Video "%s" has been published before "%s", don\'t upload it.\n',
- videoInfo.title, formatDate(program['since']))
- return res()
- }