From 8dc8a34ee8428e7657414115d1c137592efa174d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 23 Apr 2020 09:32:53 +0200 Subject: Avoir some circular dependencies --- server/models/video/video-comment.ts | 2 +- server/models/video/video-format-utils.ts | 4 ++-- server/models/video/video.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/models/video') 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' import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getCommentSort, throwIfNotValid } from '../utils' import { VideoModel } from './video' import { VideoChannelModel } from './video-channel' -import { getServerActor } from '../../helpers/utils' import { actorNameAlphabet } from '../../helpers/custom-validators/activitypub/actor' import { regexpCapture } from '../../helpers/regexp' import { uniq } from 'lodash' @@ -28,6 +27,7 @@ import { } from '../../typings/models/video' import { MUserAccountId } from '@server/typings/models' import { VideoPrivacy } from '@shared/models' +import { getServerActor } from '@server/models/application/application' enum ScopeNames { 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 { getVideoDislikesActivityPubUrl, getVideoLikesActivityPubUrl, getVideoSharesActivityPubUrl -} from '../../lib/activitypub' +} from '../../lib/activitypub/url' import { isArray } from '../../helpers/custom-validators/misc' import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model' import { @@ -23,7 +23,7 @@ import { import { MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' import { VideoFile } from '@shared/models/videos/video-file.model' import { generateMagnetUri } from '@server/helpers/webtorrent' -import { extractVideo } from '@server/lib/videos' +import { extractVideo } from '@server/helpers/video' export type VideoFormattingJSONOptions = { 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 { } from '../../helpers/custom-validators/videos' import { getVideoFileResolution } from '../../helpers/ffmpeg-utils' import { logger } from '../../helpers/logger' -import { getServerActor } from '../../helpers/utils' import { ACTIVITY_PUB, API_VERSION, @@ -126,6 +125,7 @@ import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilena import { ModelCache } from '@server/models/model-cache' import { buildListQuery, BuildVideosQueryOptions, wrapForAPIResults } from './video-query-builder' import { buildNSFWFilter } from '@server/helpers/express-utils' +import { getServerActor } from '@server/models/application/application' export enum ScopeNames { AVAILABLE_FOR_LIST_IDS = 'AVAILABLE_FOR_LIST_IDS', -- cgit v1.2.3