async function skipImport (channel: MChannel, targetUrl: string, onlyAfter?: Date) {
if (await VideoImportModel.urlAlreadyImported(channel.id, targetUrl)) {
- logger.debug('%s is already imported for channel %s, skipping video channel synchronization.', channel.name, targetUrl)
+ logger.debug('%s is already imported for channel %s, skipping video channel synchronization.', targetUrl, channel.name)
return true
}
const videoInfo = await youtubeDL.getInfoForDownload()
const onlyAfterWithoutTime = new Date(onlyAfter)
- onlyAfterWithoutTime.setHours(0, 0, 0)
+ onlyAfterWithoutTime.setHours(0, 0, 0, 0)
- if (videoInfo.originallyPublishedAtWithoutTime.getTime() >= onlyAfterWithoutTime.getTime()) {
+ if (videoInfo.originallyPublishedAtWithoutTime.getTime() < onlyAfterWithoutTime.getTime()) {
return true
}
}