+}
+
+// ---------------------------------------------------------------------------
+
+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.', targetUrl, channel.name)
+ return true
+ }
+
+ if (onlyAfter) {
+ const youtubeDL = new YoutubeDLWrapper(
+ targetUrl,
+ ServerConfigManager.Instance.getEnabledResolutions('vod'),
+ CONFIG.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION
+ )
+
+ const videoInfo = await youtubeDL.getInfoForDownload()
+
+ const onlyAfterWithoutTime = new Date(onlyAfter)
+ onlyAfterWithoutTime.setHours(0, 0, 0, 0)