From 84929846e743f4b5f3971b386ea2c447db8c416f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Maldonado?= Date: Sat, 5 Jan 2019 19:55:40 +0100 Subject: Import original publication date (CLI) * Import original publication date when importing a video from YouTube using the CLI * Fix lint issues --- shared/utils/videos/videos.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shared/utils/videos/videos.ts') diff --git a/shared/utils/videos/videos.ts b/shared/utils/videos/videos.ts index 16ecbfe84..92dadfb69 100644 --- a/shared/utils/videos/videos.ts +++ b/shared/utils/videos/videos.ts @@ -42,6 +42,7 @@ type VideoAttributes = { updateAt: string privacy?: VideoPrivacy } + originallyPublishedAt?: string } function getVideoCategories (url: string) { @@ -373,6 +374,10 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg } } + if (attributes.originallyPublishedAt !== undefined) { + req.field('originallyPublishedAt', attributes.originallyPublishedAt) + } + return req.attach('videofile', buildAbsoluteFixturePath(attributes.fixture)) .expect(specialStatus) } -- cgit v1.2.3