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 description = video.description || null
|
||||||
const support = video.support || null
|
const support = video.support || null
|
||||||
const scheduleUpdate = video.scheduleUpdate || null
|
const scheduleUpdate = video.scheduleUpdate || null
|
||||||
|
const importedFrom = video.importedFrom || null
|
||||||
const originallyPublishedAt = video.originallyPublishedAt || null
|
const originallyPublishedAt = video.originallyPublishedAt || null
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -104,6 +105,7 @@ export class VideoImportService {
|
||||||
thumbnailfile: video.thumbnailfile,
|
thumbnailfile: video.thumbnailfile,
|
||||||
previewfile: video.previewfile,
|
previewfile: video.previewfile,
|
||||||
scheduleUpdate,
|
scheduleUpdate,
|
||||||
|
importedFrom,
|
||||||
originallyPublishedAt
|
originallyPublishedAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,7 @@ async function buildVideoFromImport ({ channelId, importData, importDataOverride
|
||||||
privacy: importDataOverride?.privacy || VideoPrivacy.PRIVATE,
|
privacy: importDataOverride?.privacy || VideoPrivacy.PRIVATE,
|
||||||
duration: 0, // duration will be set by the import job
|
duration: 0, // duration will be set by the import job
|
||||||
channelId,
|
channelId,
|
||||||
|
importedFrom: importDataOverride.targetUrl || null,
|
||||||
originallyPublishedAt: importDataOverride?.originallyPublishedAt
|
originallyPublishedAt: importDataOverride?.originallyPublishedAt
|
||||||
? new Date(importDataOverride?.originallyPublishedAt)
|
? new Date(importDataOverride?.originallyPublishedAt)
|
||||||
: importData.originallyPublishedAtWithoutTime
|
: importData.originallyPublishedAtWithoutTime
|
||||||
|
|
|
@ -28,7 +28,7 @@ function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): Fil
|
||||||
support: videoInfo.support,
|
support: videoInfo.support,
|
||||||
privacy: videoInfo.privacy || VideoPrivacy.PRIVATE,
|
privacy: videoInfo.privacy || VideoPrivacy.PRIVATE,
|
||||||
channelId,
|
channelId,
|
||||||
importedFrom: null,
|
importedFrom: videoInfo.importedFrom || null,
|
||||||
originallyPublishedAt: videoInfo.originallyPublishedAt
|
originallyPublishedAt: videoInfo.originallyPublishedAt
|
||||||
? new Date(videoInfo.originallyPublishedAt)
|
? new Date(videoInfo.originallyPublishedAt)
|
||||||
: null
|
: null
|
||||||
|
|
Loading…
Reference in New Issue