From 0628157fe9662fdb2b6fa658b8b53fe684c013ce Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 29 Dec 2021 14:44:58 +0100 Subject: Move uuid stuff in extra utils Since it requires an external dependency --- 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.ts | 3 ++- 4 files changed, 6 insertions(+), 4 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 99a4818ab..7456f37c5 100644 --- a/server/models/video/formatter/video-format-utils.ts +++ b/server/models/video/formatter/video-format-utils.ts @@ -1,7 +1,7 @@ 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 { uuidToShort } from '@shared/extra-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 20741ea64..6b240f116 100644 --- a/server/models/video/video-caption.ts +++ b/server/models/video/video-caption.ts @@ -16,7 +16,7 @@ import { UpdatedAt } from 'sequelize-typescript' import { MVideo, MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models' -import { buildUUID } from '@shared/core-utils' +import { buildUUID } from '@shared/extra-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 07bb64810..0d43c795e 100644 --- a/server/models/video/video-playlist.ts +++ b/server/models/video/video-playlist.ts @@ -18,7 +18,8 @@ import { UpdatedAt } from 'sequelize-typescript' import { MAccountId, MChannelId } from '@server/types/models' -import { buildPlaylistEmbedPath, buildPlaylistWatchPath, buildUUID, pick, uuidToShort } from '@shared/core-utils' +import { buildPlaylistEmbedPath, buildPlaylistWatchPath, pick } from '@shared/core-utils' +import { buildUUID, uuidToShort } from '@shared/extra-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.ts b/server/models/video/video.ts index 1f103f930..e5077487a 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -32,7 +32,8 @@ 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, uuidToShort } from '@shared/core-utils' +import { buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' +import { uuidToShort } from '@shared/extra-utils' import { ResultList, ThumbnailType, -- cgit v1.2.3