diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-17 14:35:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-04-17 14:35:13 +0200 |
commit | 8a86e5dc4f04d7fb07d012fbe2cb7ab3baadbf19 (patch) | |
tree | b59b5b170f83fc53df6a03dde14da0f8df8b0dd3 /server | |
parent | 0502e3d0b66eb8ee7730c3a05275f54e283f60d7 (diff) | |
download | PeerTube-8a86e5dc4f04d7fb07d012fbe2cb7ab3baadbf19.tar.gz PeerTube-8a86e5dc4f04d7fb07d012fbe2cb7ab3baadbf19.tar.zst PeerTube-8a86e5dc4f04d7fb07d012fbe2cb7ab3baadbf19.zip |
Use originallyPublishedAt from body on import if it exists
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/api/videos/import.ts | 2 |
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) |