- const parent: CreateJobArgument = {
- type: 'after-video-channel-import',
- payload: {
- channelSyncId: channelSync?.id
+ 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)
+
+ if (videoInfo.originallyPublishedAtWithoutTime.getTime() < onlyAfterWithoutTime.getTime()) {
+ return true