aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-18 10:45:25 +0200
committerChocobozzz <me@florianbigard.com>2020-06-18 10:46:27 +0200
commit26d6bf6533023326fa017812cf31bbe20c752d36 (patch)
tree9c4e3ecdc344420190f17d429bdf05d78fae7a8c /server/models/video
parentd6d951ddc0c492f3261065b5dcb4df0534d252fc (diff)
downloadPeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.gz
PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.zst
PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.zip
Split types and typings
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/schedule-video-update.ts2
-rw-r--r--server/models/video/tag.ts2
-rw-r--r--server/models/video/thumbnail.ts2
-rw-r--r--server/models/video/video-abuse.ts2
-rw-r--r--server/models/video/video-blacklist.ts2
-rw-r--r--server/models/video/video-caption.ts2
-rw-r--r--server/models/video/video-change-ownership.ts2
-rw-r--r--server/models/video/video-channel.ts2
-rw-r--r--server/models/video/video-comment.ts4
-rw-r--r--server/models/video/video-file.ts4
-rw-r--r--server/models/video/video-format-utils.ts4
-rw-r--r--server/models/video/video-import.ts2
-rw-r--r--server/models/video/video-playlist-element.ts4
-rw-r--r--server/models/video/video-playlist.ts6
-rw-r--r--server/models/video/video-query-builder.ts2
-rw-r--r--server/models/video/video-share.ts4
-rw-r--r--server/models/video/video-streaming-playlist.ts2
-rw-r--r--server/models/video/video.ts6
18 files changed, 27 insertions, 27 deletions
diff --git a/server/models/video/schedule-video-update.ts b/server/models/video/schedule-video-update.ts
index 00b7f5524..1ce6bbfe5 100644
--- a/server/models/video/schedule-video-update.ts
+++ b/server/models/video/schedule-video-update.ts
@@ -2,7 +2,7 @@ import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Model, Ta
2import { ScopeNames as VideoScopeNames, VideoModel } from './video' 2import { ScopeNames as VideoScopeNames, VideoModel } from './video'
3import { VideoPrivacy } from '../../../shared/models/videos' 3import { VideoPrivacy } from '../../../shared/models/videos'
4import { Op, Transaction } from 'sequelize' 4import { Op, Transaction } from 'sequelize'
5import { MScheduleVideoUpdateFormattable, MScheduleVideoUpdateVideoAll } from '@server/typings/models' 5import { MScheduleVideoUpdateFormattable, MScheduleVideoUpdateVideoAll } from '@server/types/models'
6 6
7@Table({ 7@Table({
8 tableName: 'scheduleVideoUpdate', 8 tableName: 'scheduleVideoUpdate',
diff --git a/server/models/video/tag.ts b/server/models/video/tag.ts
index ed8df8b48..adbc4fb7d 100644
--- a/server/models/video/tag.ts
+++ b/server/models/video/tag.ts
@@ -6,7 +6,7 @@ import { throwIfNotValid } from '../utils'
6import { VideoModel } from './video' 6import { VideoModel } from './video'
7import { VideoTagModel } from './video-tag' 7import { VideoTagModel } from './video-tag'
8import { VideoPrivacy, VideoState } from '../../../shared/models/videos' 8import { VideoPrivacy, VideoState } from '../../../shared/models/videos'
9import { MTag } from '@server/typings/models' 9import { MTag } from '@server/types/models'
10 10
11@Table({ 11@Table({
12 tableName: 'tag', 12 tableName: 'tag',
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts
index e396784d2..20c1e5858 100644
--- a/server/models/video/thumbnail.ts
+++ b/server/models/video/thumbnail.ts
@@ -19,7 +19,7 @@ import { CONFIG } from '../../initializers/config'
19import { VideoModel } from './video' 19import { VideoModel } from './video'
20import { VideoPlaylistModel } from './video-playlist' 20import { VideoPlaylistModel } from './video-playlist'
21import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' 21import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type'
22import { MVideoAccountLight } from '@server/typings/models' 22import { MVideoAccountLight } from '@server/types/models'
23import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' 23import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub'
24 24
25@Table({ 25@Table({
diff --git a/server/models/video/video-abuse.ts b/server/models/video/video-abuse.ts
index 40f0ce12b..b2f111337 100644
--- a/server/models/video/video-abuse.ts
+++ b/server/models/video/video-abuse.ts
@@ -24,7 +24,7 @@ import {
24 isVideoAbuseStateValid 24 isVideoAbuseStateValid
25} from '../../helpers/custom-validators/video-abuses' 25} from '../../helpers/custom-validators/video-abuses'
26import { CONSTRAINTS_FIELDS, VIDEO_ABUSE_STATES } from '../../initializers/constants' 26import { CONSTRAINTS_FIELDS, VIDEO_ABUSE_STATES } from '../../initializers/constants'
27import { MUserAccountId, MVideoAbuse, MVideoAbuseFormattable, MVideoAbuseVideo } from '../../typings/models' 27import { MUserAccountId, MVideoAbuse, MVideoAbuseFormattable, MVideoAbuseVideo } from '../../types/models'
28import { AccountModel } from '../account/account' 28import { AccountModel } from '../account/account'
29import { buildBlockedAccountSQL, getSort, searchAttribute, throwIfNotValid } from '../utils' 29import { buildBlockedAccountSQL, getSort, searchAttribute, throwIfNotValid } from '../utils'
30import { ThumbnailModel } from './thumbnail' 30import { ThumbnailModel } from './thumbnail'
diff --git a/server/models/video/video-blacklist.ts b/server/models/video/video-blacklist.ts
index 8cbfe362e..36d2a30fa 100644
--- a/server/models/video/video-blacklist.ts
+++ b/server/models/video/video-blacklist.ts
@@ -8,7 +8,7 @@ import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
8import { FindOptions } from 'sequelize' 8import { FindOptions } from 'sequelize'
9import { ThumbnailModel } from './thumbnail' 9import { ThumbnailModel } from './thumbnail'
10import * as Bluebird from 'bluebird' 10import * as Bluebird from 'bluebird'
11import { MVideoBlacklist, MVideoBlacklistFormattable } from '@server/typings/models' 11import { MVideoBlacklist, MVideoBlacklistFormattable } from '@server/types/models'
12 12
13@Table({ 13@Table({
14 tableName: 'videoBlacklist', 14 tableName: 'videoBlacklist',
diff --git a/server/models/video/video-caption.ts b/server/models/video/video-caption.ts
index 59d3e1050..b68a6e99f 100644
--- a/server/models/video/video-caption.ts
+++ b/server/models/video/video-caption.ts
@@ -23,7 +23,7 @@ import { logger } from '../../helpers/logger'
23import { remove } from 'fs-extra' 23import { remove } from 'fs-extra'
24import { CONFIG } from '../../initializers/config' 24import { CONFIG } from '../../initializers/config'
25import * as Bluebird from 'bluebird' 25import * as Bluebird from 'bluebird'
26import { MVideoAccountLight, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/typings/models' 26import { MVideoAccountLight, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models'
27import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' 27import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub'
28 28
29export enum ScopeNames { 29export enum ScopeNames {
diff --git a/server/models/video/video-change-ownership.ts b/server/models/video/video-change-ownership.ts
index 3259b6c02..aecb03c14 100644
--- a/server/models/video/video-change-ownership.ts
+++ b/server/models/video/video-change-ownership.ts
@@ -3,7 +3,7 @@ import { AccountModel } from '../account/account'
3import { ScopeNames as VideoScopeNames, VideoModel } from './video' 3import { ScopeNames as VideoScopeNames, VideoModel } from './video'
4import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '../../../shared/models/videos' 4import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '../../../shared/models/videos'
5import { getSort } from '../utils' 5import { getSort } from '../utils'
6import { MVideoChangeOwnershipFormattable, MVideoChangeOwnershipFull } from '@server/typings/models/video/video-change-ownership' 6import { MVideoChangeOwnershipFormattable, MVideoChangeOwnershipFull } from '@server/types/models/video/video-change-ownership'
7import * as Bluebird from 'bluebird' 7import * as Bluebird from 'bluebird'
8 8
9enum ScopeNames { 9enum ScopeNames {
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index a4231b6b3..9cee64229 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -41,7 +41,7 @@ import {
41 MChannelAP, 41 MChannelAP,
42 MChannelFormattable, 42 MChannelFormattable,
43 MChannelSummaryFormattable 43 MChannelSummaryFormattable
44} from '../../typings/models/video' 44} from '../../types/models/video'
45 45
46export enum ScopeNames { 46export enum ScopeNames {
47 FOR_API = 'FOR_API', 47 FOR_API = 'FOR_API',
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index cf2a80d53..091cc2a88 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -3,7 +3,7 @@ import { uniq } from 'lodash'
3import { FindOptions, Op, Order, ScopeOptions, Sequelize, Transaction } from 'sequelize' 3import { FindOptions, Op, Order, ScopeOptions, Sequelize, Transaction } from 'sequelize'
4import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' 4import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript'
5import { getServerActor } from '@server/models/application/application' 5import { getServerActor } from '@server/models/application/application'
6import { MAccount, MAccountId, MUserAccountId } from '@server/typings/models' 6import { MAccount, MAccountId, MUserAccountId } from '@server/types/models'
7import { VideoPrivacy } from '@shared/models' 7import { VideoPrivacy } from '@shared/models'
8import { ActivityTagObject, ActivityTombstoneObject } from '../../../shared/models/activitypub/objects/common-objects' 8import { ActivityTagObject, ActivityTombstoneObject } from '../../../shared/models/activitypub/objects/common-objects'
9import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object' 9import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object'
@@ -23,7 +23,7 @@ import {
23 MCommentOwnerVideoFeed, 23 MCommentOwnerVideoFeed,
24 MCommentOwnerVideoReply, 24 MCommentOwnerVideoReply,
25 MVideoImmutable 25 MVideoImmutable
26} from '../../typings/models/video' 26} from '../../types/models/video'
27import { AccountModel } from '../account/account' 27import { AccountModel } from '../account/account'
28import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' 28import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor'
29import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getCommentSort, throwIfNotValid } from '../utils' 29import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getCommentSort, throwIfNotValid } from '../utils'
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index 201f0c0f1..f95022383 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -27,8 +27,8 @@ import { VideoRedundancyModel } from '../redundancy/video-redundancy'
27import { VideoStreamingPlaylistModel } from './video-streaming-playlist' 27import { VideoStreamingPlaylistModel } from './video-streaming-playlist'
28import { FindOptions, Op, QueryTypes, Transaction } from 'sequelize' 28import { FindOptions, Op, QueryTypes, Transaction } from 'sequelize'
29import { MIMETYPES, MEMOIZE_LENGTH, MEMOIZE_TTL } from '../../initializers/constants' 29import { MIMETYPES, MEMOIZE_LENGTH, MEMOIZE_TTL } from '../../initializers/constants'
30import { MVideoFile, MVideoFileStreamingPlaylistVideo, MVideoFileVideo } from '../../typings/models/video/video-file' 30import { MVideoFile, MVideoFileStreamingPlaylistVideo, MVideoFileVideo } from '../../types/models/video/video-file'
31import { MStreamingPlaylistVideo, MVideo } from '@server/typings/models' 31import { MStreamingPlaylistVideo, MVideo } from '@server/types/models'
32import * as memoizee from 'memoizee' 32import * as memoizee from 'memoizee'
33import validator from 'validator' 33import validator from 'validator'
34 34
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 89b0f5050..9b6509dfd 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -19,8 +19,8 @@ import {
19 MVideoFile, 19 MVideoFile,
20 MVideoFormattable, 20 MVideoFormattable,
21 MVideoFormattableDetails 21 MVideoFormattableDetails
22} from '../../typings/models' 22} from '../../types/models'
23import { MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' 23import { MVideoFileRedundanciesOpt } from '../../types/models/video/video-file'
24import { VideoFile } from '@shared/models/videos/video-file.model' 24import { VideoFile } from '@shared/models/videos/video-file.model'
25import { generateMagnetUri } from '@server/helpers/webtorrent' 25import { generateMagnetUri } from '@server/helpers/webtorrent'
26import { extractVideo } from '@server/helpers/video' 26import { extractVideo } from '@server/helpers/video'
diff --git a/server/models/video/video-import.ts b/server/models/video/video-import.ts
index fbe0ee0a7..ea1e085af 100644
--- a/server/models/video/video-import.ts
+++ b/server/models/video/video-import.ts
@@ -21,7 +21,7 @@ import { VideoImport, VideoImportState } from '../../../shared'
21import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos' 21import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos'
22import { UserModel } from '../account/user' 22import { UserModel } from '../account/user'
23import * as Bluebird from 'bluebird' 23import * as Bluebird from 'bluebird'
24import { MVideoImportDefault, MVideoImportFormattable } from '@server/typings/models/video/video-import' 24import { MVideoImportDefault, MVideoImportFormattable } from '@server/types/models/video/video-import'
25 25
26@DefaultScope(() => ({ 26@DefaultScope(() => ({
27 include: [ 27 include: [
diff --git a/server/models/video/video-playlist-element.ts b/server/models/video/video-playlist-element.ts
index 9ea73e82e..ba92e129a 100644
--- a/server/models/video/video-playlist-element.ts
+++ b/server/models/video/video-playlist-element.ts
@@ -31,8 +31,8 @@ import {
31 MVideoPlaylistElementFormattable, 31 MVideoPlaylistElementFormattable,
32 MVideoPlaylistElementVideoUrlPlaylistPrivacy, 32 MVideoPlaylistElementVideoUrlPlaylistPrivacy,
33 MVideoPlaylistVideoThumbnail 33 MVideoPlaylistVideoThumbnail
34} from '@server/typings/models/video/video-playlist-element' 34} from '@server/types/models/video/video-playlist-element'
35import { MUserAccountId } from '@server/typings/models' 35import { MUserAccountId } from '@server/types/models'
36 36
37@Table({ 37@Table({
38 tableName: 'videoPlaylistElement', 38 tableName: 'videoPlaylistElement',
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts
index d66518c9f..51fe04fc4 100644
--- a/server/models/video/video-playlist.ts
+++ b/server/models/video/video-playlist.ts
@@ -51,9 +51,9 @@ import {
51 MVideoPlaylistFull, 51 MVideoPlaylistFull,
52 MVideoPlaylistFullSummary, 52 MVideoPlaylistFullSummary,
53 MVideoPlaylistIdWithElements 53 MVideoPlaylistIdWithElements
54} from '../../typings/models/video/video-playlist' 54} from '../../types/models/video/video-playlist'
55import { MThumbnail } from '../../typings/models/video/thumbnail' 55import { MThumbnail } from '../../types/models/video/thumbnail'
56import { MAccountId, MChannelId } from '@server/typings/models' 56import { MAccountId, MChannelId } from '@server/types/models'
57 57
58enum ScopeNames { 58enum ScopeNames {
59 AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST', 59 AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST',
diff --git a/server/models/video/video-query-builder.ts b/server/models/video/video-query-builder.ts
index 6211c9e56..984b0e6af 100644
--- a/server/models/video/video-query-builder.ts
+++ b/server/models/video/video-query-builder.ts
@@ -1,7 +1,7 @@
1import { VideoFilter, VideoPrivacy, VideoState } from '@shared/models' 1import { VideoFilter, VideoPrivacy, VideoState } from '@shared/models'
2import { buildDirectionAndField, createSafeIn } from '@server/models/utils' 2import { buildDirectionAndField, createSafeIn } from '@server/models/utils'
3import { Model } from 'sequelize-typescript' 3import { Model } from 'sequelize-typescript'
4import { MUserAccountId, MUserId } from '@server/typings/models' 4import { MUserAccountId, MUserId } from '@server/types/models'
5import validator from 'validator' 5import validator from 'validator'
6import { exists } from '@server/helpers/custom-validators/misc' 6import { exists } from '@server/helpers/custom-validators/misc'
7 7
diff --git a/server/models/video/video-share.ts b/server/models/video/video-share.ts
index 4bbef75e6..f9ee94589 100644
--- a/server/models/video/video-share.ts
+++ b/server/models/video/video-share.ts
@@ -6,8 +6,8 @@ import { ActorModel } from '../activitypub/actor'
6import { buildLocalActorIdsIn, throwIfNotValid } from '../utils' 6import { buildLocalActorIdsIn, throwIfNotValid } from '../utils'
7import { VideoModel } from './video' 7import { VideoModel } from './video'
8import { literal, Op, Transaction } from 'sequelize' 8import { literal, Op, Transaction } from 'sequelize'
9import { MVideoShareActor, MVideoShareFull } from '../../typings/models/video' 9import { MVideoShareActor, MVideoShareFull } from '../../types/models/video'
10import { MActorDefault } from '../../typings/models' 10import { MActorDefault } from '../../types/models'
11 11
12enum ScopeNames { 12enum ScopeNames {
13 FULL = 'FULL', 13 FULL = 'FULL',
diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts
index 249596218..021b9b063 100644
--- a/server/models/video/video-streaming-playlist.ts
+++ b/server/models/video/video-streaming-playlist.ts
@@ -17,7 +17,7 @@ import { join } from 'path'
17import { sha1 } from '../../helpers/core-utils' 17import { sha1 } from '../../helpers/core-utils'
18import { isArrayOf } from '../../helpers/custom-validators/misc' 18import { isArrayOf } from '../../helpers/custom-validators/misc'
19import { Op, QueryTypes } from 'sequelize' 19import { Op, QueryTypes } from 'sequelize'
20import { MStreamingPlaylist, MStreamingPlaylistVideo, MVideoFile } from '@server/typings/models' 20import { MStreamingPlaylist, MStreamingPlaylistVideo, MVideoFile } from '@server/types/models'
21import { VideoFileModel } from '@server/models/video/video-file' 21import { VideoFileModel } from '@server/models/video/video-file'
22import { getTorrentFileName, getTorrentFilePath, getVideoFilename } from '@server/lib/video-paths' 22import { getTorrentFileName, getTorrentFilePath, getVideoFilename } from '@server/lib/video-paths'
23import * as memoizee from 'memoizee' 23import * as memoizee from 'memoizee'
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index b4efb76ee..e2718300e 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -117,9 +117,9 @@ import {
117 MVideoWithAllFiles, 117 MVideoWithAllFiles,
118 MVideoWithFile, 118 MVideoWithFile,
119 MVideoWithRights 119 MVideoWithRights
120} from '../../typings/models' 120} from '../../types/models'
121import { MVideoFile, MVideoFileStreamingPlaylistVideo } from '../../typings/models/video/video-file' 121import { MVideoFile, MVideoFileStreamingPlaylistVideo } from '../../types/models/video/video-file'
122import { MThumbnail } from '../../typings/models/video/thumbnail' 122import { MThumbnail } from '../../types/models/video/thumbnail'
123import { VideoFile } from '@shared/models/videos/video-file.model' 123import { VideoFile } from '@shared/models/videos/video-file.model'
124import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath } from '@server/lib/video-paths' 124import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath } from '@server/lib/video-paths'
125import { ModelCache } from '@server/models/model-cache' 125import { ModelCache } from '@server/models/model-cache'