user
})
-
// Get video subtitles
try {
const subtitles = await getYoutubeDLSubs(targetUrl)
+ logger.info('Will create %s subtitles from youtube import %s.', subtitles.length, targetUrl)
+
for (const subtitle of subtitles) {
const videoCaption = new VideoCaptionModel({
videoId: video.id,
privacy: body.privacy || VideoPrivacy.PRIVATE,
duration: 0, // duration will be set by the import job
channelId: channelId,
- originallyPublishedAt: importData.originallyPublishedAt
+ originallyPublishedAt: body.originallyPublishedAt || importData.originallyPublishedAt
}
const video = new VideoModel(videoData)
video.url = getVideoActivityPubUrl(video)