Specify video attribute "importedFrom" on import
This commit is contained in:
parent
b22e5fceb4
commit
daf3ea9c30
|
@ -85,6 +85,7 @@ export class VideoImportService {
|
|||
const description = video.description || null
|
||||
const support = video.support || null
|
||||
const scheduleUpdate = video.scheduleUpdate || null
|
||||
const importedFrom = video.importedFrom || null
|
||||
const originallyPublishedAt = video.originallyPublishedAt || null
|
||||
|
||||
return {
|
||||
|
@ -104,6 +105,7 @@ export class VideoImportService {
|
|||
thumbnailfile: video.thumbnailfile,
|
||||
previewfile: video.previewfile,
|
||||
scheduleUpdate,
|
||||
importedFrom,
|
||||
originallyPublishedAt
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,6 +123,7 @@ async function buildVideoFromImport ({ channelId, importData, importDataOverride
|
|||
privacy: importDataOverride?.privacy || VideoPrivacy.PRIVATE,
|
||||
duration: 0, // duration will be set by the import job
|
||||
channelId,
|
||||
importedFrom: importDataOverride.targetUrl || null,
|
||||
originallyPublishedAt: importDataOverride?.originallyPublishedAt
|
||||
? new Date(importDataOverride?.originallyPublishedAt)
|
||||
: importData.originallyPublishedAtWithoutTime
|
||||
|
|
|
@ -28,7 +28,7 @@ function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): Fil
|
|||
support: videoInfo.support,
|
||||
privacy: videoInfo.privacy || VideoPrivacy.PRIVATE,
|
||||
channelId,
|
||||
importedFrom: null,
|
||||
importedFrom: videoInfo.importedFrom || null,
|
||||
originallyPublishedAt: videoInfo.originallyPublishedAt
|
||||
? new Date(videoInfo.originallyPublishedAt)
|
||||
: null
|
||||
|
|
Loading…
Reference in New Issue