From c55e3d7227fe1453869e309025996b9d75256d5d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Dec 2021 11:58:15 +0100 Subject: Move test functions outside extra-utils --- server/models/video/formatter/video-format-utils.ts | 2 +- server/models/video/video-caption.ts | 2 +- server/models/video/video-playlist.ts | 3 +-- server/models/video/video-streaming-playlist.ts | 2 +- server/models/video/video.ts | 3 +-- 5 files changed, 5 insertions(+), 7 deletions(-) (limited to 'server/models/video') diff --git a/server/models/video/formatter/video-format-utils.ts b/server/models/video/formatter/video-format-utils.ts index f6c750ccf..99a4818ab 100644 --- a/server/models/video/formatter/video-format-utils.ts +++ b/server/models/video/formatter/video-format-utils.ts @@ -1,7 +1,7 @@ -import { uuidToShort } from '@shared/core-utils/uuid' import { generateMagnetUri } from '@server/helpers/webtorrent' import { getLocalVideoFileMetadataUrl } from '@server/lib/video-urls' import { VideoViews } from '@server/lib/video-views' +import { uuidToShort } from '@shared/core-utils' import { VideoFile, VideosCommonQueryAfterSanitize } from '@shared/models' import { ActivityTagObject, ActivityUrlObject, VideoObject } from '../../../../shared/models/activitypub/objects' import { Video, VideoDetails, VideoInclude } from '../../../../shared/models/videos' diff --git a/server/models/video/video-caption.ts b/server/models/video/video-caption.ts index 642613cfe..20741ea64 100644 --- a/server/models/video/video-caption.ts +++ b/server/models/video/video-caption.ts @@ -15,8 +15,8 @@ import { Table, UpdatedAt } from 'sequelize-typescript' -import { buildUUID } from '@shared/core-utils/uuid' import { MVideo, MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models' +import { buildUUID } from '@shared/core-utils' import { AttributesOnly } from '@shared/typescript-utils' import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts index 132fa0e68..07bb64810 100644 --- a/server/models/video/video-playlist.ts +++ b/server/models/video/video-playlist.ts @@ -18,8 +18,7 @@ import { UpdatedAt } from 'sequelize-typescript' import { MAccountId, MChannelId } from '@server/types/models' -import { buildPlaylistEmbedPath, buildPlaylistWatchPath, pick } from '@shared/core-utils' -import { buildUUID, uuidToShort } from '@shared/core-utils/uuid' +import { buildPlaylistEmbedPath, buildPlaylistWatchPath, buildUUID, pick, uuidToShort } from '@shared/core-utils' import { AttributesOnly } from '@shared/typescript-utils' import { ActivityIconObject } from '../../../shared/models/activitypub/objects' import { PlaylistObject } from '../../../shared/models/activitypub/objects/playlist-object' diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts index d813f89b5..7b410f8ee 100644 --- a/server/models/video/video-streaming-playlist.ts +++ b/server/models/video/video-streaming-playlist.ts @@ -21,7 +21,7 @@ import { MStreamingPlaylist, MVideo } from '@server/types/models' import { AttributesOnly } from '@shared/typescript-utils' import { VideoStorage } from '@shared/models' import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' -import { sha1 } from '@shared/core-utils/crypto' +import { sha1 } from '@shared/core-utils/common/crypto' import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' import { isArrayOf } from '../../helpers/custom-validators/misc' import { isVideoFileInfoHashValid } from '../../helpers/custom-validators/videos' diff --git a/server/models/video/video.ts b/server/models/video/video.ts index a99b012b9..66a9a28fa 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -32,8 +32,7 @@ import { getHLSDirectory, getHLSRedundancyDirectory } from '@server/lib/paths' import { VideoPathManager } from '@server/lib/video-path-manager' import { getServerActor } from '@server/models/application/application' import { ModelCache } from '@server/models/model-cache' -import { buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' -import { uuidToShort } from '@shared/core-utils/uuid' +import { buildVideoEmbedPath, buildVideoWatchPath, pick, uuidToShort } from '@shared/core-utils' import { VideoFile, VideoInclude } from '@shared/models' import { AttributesOnly } from '@shared/typescript-utils' import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' -- cgit v1.2.3