diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video-playlist.ts | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts index b020bfa45..9f9e0b069 100644 --- a/server/models/video/video-playlist.ts +++ b/server/models/video/video-playlist.ts | |||
@@ -1,3 +1,6 @@ | |||
1 | import * as Bluebird from 'bluebird' | ||
2 | import { join } from 'path' | ||
3 | import { FindOptions, literal, Op, ScopeOptions, Transaction, WhereOptions } from 'sequelize' | ||
1 | import { | 4 | import { |
2 | AllowNull, | 5 | AllowNull, |
3 | BelongsTo, | 6 | BelongsTo, |
@@ -15,14 +18,19 @@ import { | |||
15 | Table, | 18 | Table, |
16 | UpdatedAt | 19 | UpdatedAt |
17 | } from 'sequelize-typescript' | 20 | } from 'sequelize-typescript' |
21 | import { MAccountId, MChannelId } from '@server/types/models' | ||
22 | import { ActivityIconObject } from '../../../shared/models/activitypub/objects' | ||
23 | import { PlaylistObject } from '../../../shared/models/activitypub/objects/playlist-object' | ||
18 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' | 24 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' |
19 | import { buildServerIdsFollowedBy, buildWhereIdOrUUID, getPlaylistSort, getPlaylistSort, isOutdated, throwIfNotValid } from '../utils' | 25 | import { VideoPlaylistType } from '../../../shared/models/videos/playlist/video-playlist-type.model' |
26 | import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model' | ||
27 | import { activityPubCollectionPagination } from '../../helpers/activitypub' | ||
28 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | ||
20 | import { | 29 | import { |
21 | isVideoPlaylistDescriptionValid, | 30 | isVideoPlaylistDescriptionValid, |
22 | isVideoPlaylistNameValid, | 31 | isVideoPlaylistNameValid, |
23 | isVideoPlaylistPrivacyValid | 32 | isVideoPlaylistPrivacyValid |
24 | } from '../../helpers/custom-validators/video-playlists' | 33 | } from '../../helpers/custom-validators/video-playlists' |
25 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | ||
26 | import { | 34 | import { |
27 | ACTIVITY_PUB, | 35 | ACTIVITY_PUB, |
28 | CONSTRAINTS_FIELDS, | 36 | CONSTRAINTS_FIELDS, |
@@ -32,18 +40,7 @@ import { | |||
32 | VIDEO_PLAYLIST_TYPES, | 40 | VIDEO_PLAYLIST_TYPES, |
33 | WEBSERVER | 41 | WEBSERVER |
34 | } from '../../initializers/constants' | 42 | } from '../../initializers/constants' |
35 | import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model' | 43 | import { MThumbnail } from '../../types/models/video/thumbnail' |
36 | import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions } from '../account/account' | ||
37 | import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel' | ||
38 | import { join } from 'path' | ||
39 | import { VideoPlaylistElementModel } from './video-playlist-element' | ||
40 | import { PlaylistObject } from '../../../shared/models/activitypub/objects/playlist-object' | ||
41 | import { activityPubCollectionPagination } from '../../helpers/activitypub' | ||
42 | import { VideoPlaylistType } from '../../../shared/models/videos/playlist/video-playlist-type.model' | ||
43 | import { ThumbnailModel } from './thumbnail' | ||
44 | import { ActivityIconObject } from '../../../shared/models/activitypub/objects' | ||
45 | import { FindOptions, literal, Op, ScopeOptions, Transaction, WhereOptions } from 'sequelize' | ||
46 | import * as Bluebird from 'bluebird' | ||
47 | import { | 44 | import { |
48 | MVideoPlaylistAccountThumbnail, | 45 | MVideoPlaylistAccountThumbnail, |
49 | MVideoPlaylistAP, | 46 | MVideoPlaylistAP, |
@@ -52,8 +49,11 @@ import { | |||
52 | MVideoPlaylistFullSummary, | 49 | MVideoPlaylistFullSummary, |
53 | MVideoPlaylistIdWithElements | 50 | MVideoPlaylistIdWithElements |
54 | } from '../../types/models/video/video-playlist' | 51 | } from '../../types/models/video/video-playlist' |
55 | import { MThumbnail } from '../../types/models/video/thumbnail' | 52 | import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions } from '../account/account' |
56 | import { MAccountId, MChannelId } from '@server/types/models' | 53 | import { buildServerIdsFollowedBy, buildWhereIdOrUUID, getPlaylistSort, isOutdated, throwIfNotValid } from '../utils' |
54 | import { ThumbnailModel } from './thumbnail' | ||
55 | import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel' | ||
56 | import { VideoPlaylistElementModel } from './video-playlist-element' | ||
57 | 57 | ||
58 | enum ScopeNames { | 58 | enum ScopeNames { |
59 | AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST', | 59 | AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST', |