aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-17 14:35:13 +0200
committerChocobozzz <me@florianbigard.com>2020-04-17 14:35:13 +0200
commit8a86e5dc4f04d7fb07d012fbe2cb7ab3baadbf19 (patch)
treeb59b5b170f83fc53df6a03dde14da0f8df8b0dd3 /server/controllers/api/videos
parent0502e3d0b66eb8ee7730c3a05275f54e283f60d7 (diff)
downloadPeerTube-8a86e5dc4f04d7fb07d012fbe2cb7ab3baadbf19.tar.gz
PeerTube-8a86e5dc4f04d7fb07d012fbe2cb7ab3baadbf19.tar.zst
PeerTube-8a86e5dc4f04d7fb07d012fbe2cb7ab3baadbf19.zip
Use originallyPublishedAt from body on import if it exists
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/import.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index fb9d73140..f4630375e 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -231,7 +231,7 @@ function buildVideo (channelId: number, body: VideoImportCreate, importData: You
231 privacy: body.privacy || VideoPrivacy.PRIVATE, 231 privacy: body.privacy || VideoPrivacy.PRIVATE,
232 duration: 0, // duration will be set by the import job 232 duration: 0, // duration will be set by the import job
233 channelId: channelId, 233 channelId: channelId,
234 originallyPublishedAt: importData.originallyPublishedAt 234 originallyPublishedAt: body.originallyPublishedAt || importData.originallyPublishedAt
235 } 235 }
236 const video = new VideoModel(videoData) 236 const video = new VideoModel(videoData)
237 video.url = getVideoActivityPubUrl(video) 237 video.url = getVideoActivityPubUrl(video)