diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-17 11:58:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-17 12:24:03 +0100 |
commit | c55e3d7227fe1453869e309025996b9d75256d5d (patch) | |
tree | 08e9b0ca210d75c82c8606fef0852eca020e8e0e /server/models/video | |
parent | bf54587a3e2ad9c2c186828f2a5682b91ee2cc00 (diff) | |
download | PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.gz PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.zst PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.zip |
Move test functions outside extra-utils
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/formatter/video-format-utils.ts | 2 | ||||
-rw-r--r-- | server/models/video/video-caption.ts | 2 | ||||
-rw-r--r-- | server/models/video/video-playlist.ts | 3 | ||||
-rw-r--r-- | server/models/video/video-streaming-playlist.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 3 |
5 files changed, 5 insertions, 7 deletions
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 @@ | |||
1 | import { uuidToShort } from '@shared/core-utils/uuid' | ||
2 | import { generateMagnetUri } from '@server/helpers/webtorrent' | 1 | import { generateMagnetUri } from '@server/helpers/webtorrent' |
3 | import { getLocalVideoFileMetadataUrl } from '@server/lib/video-urls' | 2 | import { getLocalVideoFileMetadataUrl } from '@server/lib/video-urls' |
4 | import { VideoViews } from '@server/lib/video-views' | 3 | import { VideoViews } from '@server/lib/video-views' |
4 | import { uuidToShort } from '@shared/core-utils' | ||
5 | import { VideoFile, VideosCommonQueryAfterSanitize } from '@shared/models' | 5 | import { VideoFile, VideosCommonQueryAfterSanitize } from '@shared/models' |
6 | import { ActivityTagObject, ActivityUrlObject, VideoObject } from '../../../../shared/models/activitypub/objects' | 6 | import { ActivityTagObject, ActivityUrlObject, VideoObject } from '../../../../shared/models/activitypub/objects' |
7 | import { Video, VideoDetails, VideoInclude } from '../../../../shared/models/videos' | 7 | 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 { | |||
15 | Table, | 15 | Table, |
16 | UpdatedAt | 16 | UpdatedAt |
17 | } from 'sequelize-typescript' | 17 | } from 'sequelize-typescript' |
18 | import { buildUUID } from '@shared/core-utils/uuid' | ||
19 | import { MVideo, MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models' | 18 | import { MVideo, MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models' |
19 | import { buildUUID } from '@shared/core-utils' | ||
20 | import { AttributesOnly } from '@shared/typescript-utils' | 20 | import { AttributesOnly } from '@shared/typescript-utils' |
21 | import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' | 21 | import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' |
22 | import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' | 22 | 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 { | |||
18 | UpdatedAt | 18 | UpdatedAt |
19 | } from 'sequelize-typescript' | 19 | } from 'sequelize-typescript' |
20 | import { MAccountId, MChannelId } from '@server/types/models' | 20 | import { MAccountId, MChannelId } from '@server/types/models' |
21 | import { buildPlaylistEmbedPath, buildPlaylistWatchPath, pick } from '@shared/core-utils' | 21 | import { buildPlaylistEmbedPath, buildPlaylistWatchPath, buildUUID, pick, uuidToShort } from '@shared/core-utils' |
22 | import { buildUUID, uuidToShort } from '@shared/core-utils/uuid' | ||
23 | import { AttributesOnly } from '@shared/typescript-utils' | 22 | import { AttributesOnly } from '@shared/typescript-utils' |
24 | import { ActivityIconObject } from '../../../shared/models/activitypub/objects' | 23 | import { ActivityIconObject } from '../../../shared/models/activitypub/objects' |
25 | import { PlaylistObject } from '../../../shared/models/activitypub/objects/playlist-object' | 24 | 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' | |||
21 | import { AttributesOnly } from '@shared/typescript-utils' | 21 | import { AttributesOnly } from '@shared/typescript-utils' |
22 | import { VideoStorage } from '@shared/models' | 22 | import { VideoStorage } from '@shared/models' |
23 | import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' | 23 | import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' |
24 | import { sha1 } from '@shared/core-utils/crypto' | 24 | import { sha1 } from '@shared/core-utils/common/crypto' |
25 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | 25 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' |
26 | import { isArrayOf } from '../../helpers/custom-validators/misc' | 26 | import { isArrayOf } from '../../helpers/custom-validators/misc' |
27 | import { isVideoFileInfoHashValid } from '../../helpers/custom-validators/videos' | 27 | 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' | |||
32 | import { VideoPathManager } from '@server/lib/video-path-manager' | 32 | import { VideoPathManager } from '@server/lib/video-path-manager' |
33 | import { getServerActor } from '@server/models/application/application' | 33 | import { getServerActor } from '@server/models/application/application' |
34 | import { ModelCache } from '@server/models/model-cache' | 34 | import { ModelCache } from '@server/models/model-cache' |
35 | import { buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' | 35 | import { buildVideoEmbedPath, buildVideoWatchPath, pick, uuidToShort } from '@shared/core-utils' |
36 | import { uuidToShort } from '@shared/core-utils/uuid' | ||
37 | import { VideoFile, VideoInclude } from '@shared/models' | 36 | import { VideoFile, VideoInclude } from '@shared/models' |
38 | import { AttributesOnly } from '@shared/typescript-utils' | 37 | import { AttributesOnly } from '@shared/typescript-utils' |
39 | import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' | 38 | import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' |