aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-23 09:32:53 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-05-04 16:21:39 +0200
commit8dc8a34ee8428e7657414115d1c137592efa174d (patch)
treee9b5ef0d7446d1b7766eac18da5a759edc7a9040 /server/models/video
parent7fed637506043e4432cbebe041ada0625171cceb (diff)
downloadPeerTube-8dc8a34ee8428e7657414115d1c137592efa174d.tar.gz
PeerTube-8dc8a34ee8428e7657414115d1c137592efa174d.tar.zst
PeerTube-8dc8a34ee8428e7657414115d1c137592efa174d.zip
Avoir some circular dependencies
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video-comment.ts2
-rw-r--r--server/models/video/video-format-utils.ts4
-rw-r--r--server/models/video/video.ts2
3 files changed, 4 insertions, 4 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index 7cdff8c2c..b7ed6240e 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -9,7 +9,6 @@ import { ActorModel } from '../activitypub/actor'
9import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getCommentSort, throwIfNotValid } from '../utils' 9import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getCommentSort, throwIfNotValid } from '../utils'
10import { VideoModel } from './video' 10import { VideoModel } from './video'
11import { VideoChannelModel } from './video-channel' 11import { VideoChannelModel } from './video-channel'
12import { getServerActor } from '../../helpers/utils'
13import { actorNameAlphabet } from '../../helpers/custom-validators/activitypub/actor' 12import { actorNameAlphabet } from '../../helpers/custom-validators/activitypub/actor'
14import { regexpCapture } from '../../helpers/regexp' 13import { regexpCapture } from '../../helpers/regexp'
15import { uniq } from 'lodash' 14import { uniq } from 'lodash'
@@ -28,6 +27,7 @@ import {
28} from '../../typings/models/video' 27} from '../../typings/models/video'
29import { MUserAccountId } from '@server/typings/models' 28import { MUserAccountId } from '@server/typings/models'
30import { VideoPrivacy } from '@shared/models' 29import { VideoPrivacy } from '@shared/models'
30import { getServerActor } from '@server/models/application/application'
31 31
32enum ScopeNames { 32enum ScopeNames {
33 WITH_ACCOUNT = 'WITH_ACCOUNT', 33 WITH_ACCOUNT = 'WITH_ACCOUNT',
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 365c9581e..0d3c5a8ac 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -8,7 +8,7 @@ import {
8 getVideoDislikesActivityPubUrl, 8 getVideoDislikesActivityPubUrl,
9 getVideoLikesActivityPubUrl, 9 getVideoLikesActivityPubUrl,
10 getVideoSharesActivityPubUrl 10 getVideoSharesActivityPubUrl
11} from '../../lib/activitypub' 11} from '../../lib/activitypub/url'
12import { isArray } from '../../helpers/custom-validators/misc' 12import { isArray } from '../../helpers/custom-validators/misc'
13import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model' 13import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model'
14import { 14import {
@@ -23,7 +23,7 @@ import {
23import { MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' 23import { MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file'
24import { VideoFile } from '@shared/models/videos/video-file.model' 24import { VideoFile } from '@shared/models/videos/video-file.model'
25import { generateMagnetUri } from '@server/helpers/webtorrent' 25import { generateMagnetUri } from '@server/helpers/webtorrent'
26import { extractVideo } from '@server/lib/videos' 26import { extractVideo } from '@server/helpers/video'
27 27
28export type VideoFormattingJSONOptions = { 28export type VideoFormattingJSONOptions = {
29 completeDescription?: boolean 29 completeDescription?: boolean
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index ccb9d64ca..96b96e5ac 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -43,7 +43,6 @@ import {
43} from '../../helpers/custom-validators/videos' 43} from '../../helpers/custom-validators/videos'
44import { getVideoFileResolution } from '../../helpers/ffmpeg-utils' 44import { getVideoFileResolution } from '../../helpers/ffmpeg-utils'
45import { logger } from '../../helpers/logger' 45import { logger } from '../../helpers/logger'
46import { getServerActor } from '../../helpers/utils'
47import { 46import {
48 ACTIVITY_PUB, 47 ACTIVITY_PUB,
49 API_VERSION, 48 API_VERSION,
@@ -126,6 +125,7 @@ import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilena
126import { ModelCache } from '@server/models/model-cache' 125import { ModelCache } from '@server/models/model-cache'
127import { buildListQuery, BuildVideosQueryOptions, wrapForAPIResults } from './video-query-builder' 126import { buildListQuery, BuildVideosQueryOptions, wrapForAPIResults } from './video-query-builder'
128import { buildNSFWFilter } from '@server/helpers/express-utils' 127import { buildNSFWFilter } from '@server/helpers/express-utils'
128import { getServerActor } from '@server/models/application/application'
129 129
130export enum ScopeNames { 130export enum ScopeNames {
131 AVAILABLE_FOR_LIST_IDS = 'AVAILABLE_FOR_LIST_IDS', 131 AVAILABLE_FOR_LIST_IDS = 'AVAILABLE_FOR_LIST_IDS',