diff --git a/client/src/app/shared/shared-main/video/video-import.service.ts b/client/src/app/shared/shared-main/video/video-import.service.ts index 607c08d71..8a2a46db7 100644 --- a/client/src/app/shared/shared-main/video/video-import.service.ts +++ b/client/src/app/shared/shared-main/video/video-import.service.ts @@ -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 } } diff --git a/server/lib/video-pre-import.ts b/server/lib/video-pre-import.ts index 796079875..e1318a5d4 100644 --- a/server/lib/video-pre-import.ts +++ b/server/lib/video-pre-import.ts @@ -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 diff --git a/server/lib/video.ts b/server/lib/video.ts index 814e254b5..3580260ec 100644 --- a/server/lib/video.ts +++ b/server/lib/video.ts @@ -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