]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/utils/videos/videos.ts
Add ability to limit videos history size
[github/Chocobozzz/PeerTube.git] / shared / utils / videos / videos.ts
index 16b5165f13349def7515b59364c1c1062d4b1215..b5a07b792d55bd93eda3be9dfd9405cb4b819c66 100644 (file)
@@ -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 }