import { addContextMenu, getVideojsOptions, loadLocale } from '../../assets/player/peertube-player'
import { PeerTubeResolution } from '../player/definitions'
import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings'
-import { VideoCaption } from '../../../../shared/models/videos/video-caption.model'
+import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
/**
* Embed API exposes control of the embed player to the outside world via
import { JobType, VideoRateType, VideoState } from '../../shared/models'
import { ActivityPubActorType } from '../../shared/models/activitypub'
import { FollowState } from '../../shared/models/actors'
-import { VideoPrivacy, VideoAbuseState } from '../../shared/models/videos'
+import { VideoPrivacy, VideoAbuseState, VideoImportState } from '../../shared/models/videos'
// Do not use barrels, remain constants as independent as possible
import { buildPath, isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils'
import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type'
import { invert } from 'lodash'
-import { VideoImportState } from '../../shared/models/videos/video-import-state.enum'
// Use a variable to reload the configuration if we need
let config: IConfig = require('config')
import { throwIfNotValid } from '../utils'
import { VideoModel } from './video'
import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions'
-import { VideoCaption } from '../../../shared/models/videos/video-caption.model'
+import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model'
import { CONFIG, STATIC_PATHS, VIDEO_LANGUAGES } from '../../initializers'
import { join } from 'path'
import { logger } from '../../helpers/logger'
import { rateVideo } from '../../utils/videos/videos'
import { waitJobs } from '../../utils/server/jobs'
import { createVideoCaption, listVideoCaptions, testCaptionFile } from '../../utils/videos/video-captions'
-import { VideoCaption } from '../../../../shared/models/videos/video-caption.model'
+import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
const expect = chai.expect
import { flushTests, killallServers, ServerInfo, setAccessTokensToServers } from '../../utils/index'
import { waitJobs } from '../../utils/server/jobs'
import { createVideoCaption, deleteVideoCaption, listVideoCaptions, testCaptionFile } from '../../utils/videos/video-captions'
-import { VideoCaption } from '../../../../shared/models/videos/video-caption.model'
+import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
const expect = chai.expect
import * as request from 'supertest'
-import { VideoAbuseUpdate } from '../../../../shared/models/videos/video-abuse-update.model'
+import { VideoAbuseUpdate } from '../../../../shared/models/videos/abuse/video-abuse-update.model'
import { makeDeleteRequest, makePutBodyRequest } from '..'
function reportVideoAbuse (url: string, token: string, videoId: number | string, reason: string, specialStatus = 200) {
import { Account } from '../actors'
-import { VideoChannel } from '../videos/video-channel.model'
+import { VideoChannel } from '../videos/channel/video-channel.model'
import { UserRole } from './user-role'
import { NSFWPolicyType } from '../videos/nsfw-policy.type'
-import { Account } from '../actors'
-import { VideoConstant } from './video-constant.model'
+import { Account } from '../../actors/index'
+import { VideoConstant } from '../video-constant.model'
import { VideoAbuseState } from './video-abuse-state.model'
export interface VideoAbuse {
-import { VideoConstant } from './video-constant.model'
+import { VideoConstant } from '../video-constant.model'
export interface VideoCaption {
language: VideoConstant<string>
-import { Actor } from '../actors/actor.model'
-import { Video } from './video.model'
-import { Account } from '../actors'
+import { Actor } from '../../actors/actor.model'
+import { Video } from '../video.model'
+import { Account } from '../../actors/index'
export interface VideoChannel extends Actor {
displayName: string
-import { VideoUpdate } from './video-update.model'
+import { VideoUpdate } from '../video-update.model'
export interface VideoImportCreate extends VideoUpdate {
targetUrl?: string
-import { Video } from './video.model'
-import { VideoConstant } from './video-constant.model'
+import { Video } from '../video.model'
+import { VideoConstant } from '../video-constant.model'
import { VideoImportState } from './video-import-state.enum'
export interface VideoImport {
-export * from './user-video-rate-update.model'
-export * from './user-video-rate.model'
-export * from './user-video-rate.type'
-export * from './video-abuse-state.model'
-export * from './video-abuse-create.model'
-export * from './video-abuse.model'
-export * from './video-abuse-update.model'
-export * from './video-blacklist.model'
-export * from './video-blacklist-create.model'
-export * from './video-blacklist-update.model'
-export * from './video-channel-create.model'
-export * from './video-channel-update.model'
-export * from './video-channel.model'
+export * from './rate/user-video-rate-update.model'
+export * from './rate/user-video-rate.model'
+export * from './rate/user-video-rate.type'
+export * from './abuse/video-abuse-state.model'
+export * from './abuse/video-abuse-create.model'
+export * from './abuse/video-abuse.model'
+export * from './abuse/video-abuse-update.model'
+export * from './blacklist/video-blacklist.model'
+export * from './blacklist/video-blacklist-create.model'
+export * from './blacklist/video-blacklist-update.model'
+export * from './channel/video-channel-create.model'
+export * from './channel/video-channel-update.model'
+export * from './channel/video-channel.model'
export * from './video-create.model'
export * from './video-privacy.enum'
export * from './video-rate.type'
export * from './video-update.model'
export * from './video.model'
export * from './video-state.enum'
-export * from './video-caption-update.model'
-export * from './video-import-create.model'
-export * from './video-import-state.enum'
-export * from './video-import.model'
+export * from './caption/video-caption-update.model'
+export * from './import/video-import-create.model'
+export * from './import/video-import-state.enum'
+export * from './import/video-import.model'
export { VideoConstant } from './video-constant.model'
import { VideoResolution, VideoState } from '../../index'
import { Account } from '../actors'
import { Avatar } from '../avatars/avatar.model'
-import { VideoChannel } from './video-channel.model'
+import { VideoChannel } from './channel/video-channel.model'
import { VideoPrivacy } from './video-privacy.enum'
import { VideoScheduleUpdate } from './video-schedule-update.model'
import { VideoConstant } from './video-constant.model'