X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Futils%2Fvideos%2Fvideos.ts;h=b5a07b792d55bd93eda3be9dfd9405cb4b819c66;hb=8f0bc73d7d5f4c88cbc5588a0ece12b3855c8f98;hp=16b5165f13349def7515b59364c1c1062d4b1215;hpb=df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/utils/videos/videos.ts b/shared/utils/videos/videos.ts index 16b5165f1..b5a07b792 100644 --- a/shared/utils/videos/videos.ts +++ b/shared/utils/videos/videos.ts @@ -18,9 +18,11 @@ import { } from '../' import * as validator from 'validator' import { VideoDetails, VideoPrivacy } from '../../models/videos' -import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants' +import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, loadLanguages, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants' import { dateIsValid, webtorrentAdd } from '../miscs/miscs' +loadLanguages() + type VideoAttributes = { name?: string category?: number @@ -608,7 +610,6 @@ async function uploadVideoAndGetId (options: { server: ServerInfo, videoName: st const videoAttrs: any = { name: options.videoName } if (options.nsfw) videoAttrs.nsfw = options.nsfw - const res = await uploadVideo(options.server.url, options.token || options.server.accessToken, videoAttrs) return { id: res.body.video.id, uuid: res.body.video.uuid }