support: body.support || null,
privacy: body.privacy || VideoPrivacy.PRIVATE,
duration: 0, // duration will be set by the import job
- channelId: channelId
+ channelId: channelId,
+ originallyPublishedAt: importData.originallyPublishedAt
}
const video = new VideoModel(videoData)
video.url = getVideoActivityPubUrl(video)
nsfw?: boolean
tags?: string[]
thumbnailUrl?: string
+ originallyPublishedAt?: string
}
const processOptions = {
}
function buildVideoInfo (obj: any) {
+
+ const date = obj.upload_date.slice(0,4)+","+obj.upload_date.slice(4,6)+","+obj.upload_date.slice(6,8)
+
return {
name: titleTruncation(obj.title),
description: descriptionTruncation(obj.description),
licence: getLicence(obj.license),
nsfw: isNSFW(obj),
tags: getTags(obj.tags),
- thumbnailUrl: obj.thumbnail || undefined
+ thumbnailUrl: obj.thumbnail || undefined,
+ originallyPublishedAt: new Date(date).toISOString()
}
}