aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/captions.ts3
-rw-r--r--server/controllers/api/videos/import.ts3
-rw-r--r--server/controllers/api/videos/index.ts4
-rw-r--r--server/controllers/api/videos/rate.ts3
4 files changed, 8 insertions, 5 deletions
diff --git a/server/controllers/api/videos/captions.ts b/server/controllers/api/videos/captions.ts
index 7dd36e368..44c255232 100644
--- a/server/controllers/api/videos/captions.ts
+++ b/server/controllers/api/videos/captions.ts
@@ -2,13 +2,14 @@ import * as express from 'express'
2import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate } from '../../../middlewares' 2import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate } from '../../../middlewares'
3import { addVideoCaptionValidator, deleteVideoCaptionValidator, listVideoCaptionsValidator } from '../../../middlewares/validators' 3import { addVideoCaptionValidator, deleteVideoCaptionValidator, listVideoCaptionsValidator } from '../../../middlewares/validators'
4import { createReqFiles } from '../../../helpers/express-utils' 4import { createReqFiles } from '../../../helpers/express-utils'
5import { MIMETYPES, sequelizeTypescript } from '../../../initializers' 5import { MIMETYPES } from '../../../initializers/constants'
6import { getFormattedObjects } from '../../../helpers/utils' 6import { getFormattedObjects } from '../../../helpers/utils'
7import { VideoCaptionModel } from '../../../models/video/video-caption' 7import { VideoCaptionModel } from '../../../models/video/video-caption'
8import { logger } from '../../../helpers/logger' 8import { logger } from '../../../helpers/logger'
9import { federateVideoIfNeeded } from '../../../lib/activitypub' 9import { federateVideoIfNeeded } from '../../../lib/activitypub'
10import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' 10import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils'
11import { CONFIG } from '../../../initializers/config' 11import { CONFIG } from '../../../initializers/config'
12import { sequelizeTypescript } from '../../../initializers/database'
12 13
13const reqVideoCaptionAdd = createReqFiles( 14const reqVideoCaptionAdd = createReqFiles(
14 [ 'captionfile' ], 15 [ 'captionfile' ],
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index 5a8cd703e..a72b8c72e 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -3,7 +3,7 @@ import * as magnetUtil from 'magnet-uri'
3import 'multer' 3import 'multer'
4import { auditLoggerFactory, getAuditIdFromRes, VideoImportAuditView } from '../../../helpers/audit-logger' 4import { auditLoggerFactory, getAuditIdFromRes, VideoImportAuditView } from '../../../helpers/audit-logger'
5import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoImportAddValidator } from '../../../middlewares' 5import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoImportAddValidator } from '../../../middlewares'
6import { MIMETYPES, PREVIEWS_SIZE, sequelizeTypescript, THUMBNAILS_SIZE } from '../../../initializers' 6import { MIMETYPES, PREVIEWS_SIZE, THUMBNAILS_SIZE } from '../../../initializers/constants'
7import { getYoutubeDLInfo, YoutubeDLInfo } from '../../../helpers/youtube-dl' 7import { getYoutubeDLInfo, YoutubeDLInfo } from '../../../helpers/youtube-dl'
8import { createReqFiles } from '../../../helpers/express-utils' 8import { createReqFiles } from '../../../helpers/express-utils'
9import { logger } from '../../../helpers/logger' 9import { logger } from '../../../helpers/logger'
@@ -25,6 +25,7 @@ import { getSecureTorrentName } from '../../../helpers/utils'
25import { move, readFile } from 'fs-extra' 25import { move, readFile } from 'fs-extra'
26import { autoBlacklistVideoIfNeeded } from '../../../lib/video-blacklist' 26import { autoBlacklistVideoIfNeeded } from '../../../lib/video-blacklist'
27import { CONFIG } from '../../../initializers/config' 27import { CONFIG } from '../../../initializers/config'
28import { sequelizeTypescript } from '../../../initializers/database'
28 29
29const auditLogger = auditLoggerFactory('video-imports') 30const auditLogger = auditLoggerFactory('video-imports')
30const videoImportsRouter = express.Router() 31const videoImportsRouter = express.Router()
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 9470afabf..d6f513254 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -10,13 +10,12 @@ import { autoBlacklistVideoIfNeeded } from '../../../lib/video-blacklist'
10import { 10import {
11 MIMETYPES, 11 MIMETYPES,
12 PREVIEWS_SIZE, 12 PREVIEWS_SIZE,
13 sequelizeTypescript,
14 THUMBNAILS_SIZE, 13 THUMBNAILS_SIZE,
15 VIDEO_CATEGORIES, 14 VIDEO_CATEGORIES,
16 VIDEO_LANGUAGES, 15 VIDEO_LANGUAGES,
17 VIDEO_LICENCES, 16 VIDEO_LICENCES,
18 VIDEO_PRIVACIES 17 VIDEO_PRIVACIES
19} from '../../../initializers' 18} from '../../../initializers/constants'
20import { 19import {
21 changeVideoChannelShare, 20 changeVideoChannelShare,
22 federateVideoIfNeeded, 21 federateVideoIfNeeded,
@@ -61,6 +60,7 @@ import { watchingRouter } from './watching'
61import { Notifier } from '../../../lib/notifier' 60import { Notifier } from '../../../lib/notifier'
62import { sendView } from '../../../lib/activitypub/send/send-view' 61import { sendView } from '../../../lib/activitypub/send/send-view'
63import { CONFIG } from '../../../initializers/config' 62import { CONFIG } from '../../../initializers/config'
63import { sequelizeTypescript } from '../../../initializers/database'
64 64
65const auditLogger = auditLoggerFactory('videos') 65const auditLogger = auditLoggerFactory('videos')
66const videosRouter = express.Router() 66const videosRouter = express.Router()
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts
index 914c596c3..b65babedf 100644
--- a/server/controllers/api/videos/rate.ts
+++ b/server/controllers/api/videos/rate.ts
@@ -1,11 +1,12 @@
1import * as express from 'express' 1import * as express from 'express'
2import { UserVideoRateUpdate } from '../../../../shared' 2import { UserVideoRateUpdate } from '../../../../shared'
3import { logger } from '../../../helpers/logger' 3import { logger } from '../../../helpers/logger'
4import { sequelizeTypescript, VIDEO_RATE_TYPES } from '../../../initializers' 4import { VIDEO_RATE_TYPES } from '../../../initializers/constants'
5import { getRateUrl, sendVideoRateChange } from '../../../lib/activitypub' 5import { getRateUrl, sendVideoRateChange } from '../../../lib/activitypub'
6import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoUpdateRateValidator } from '../../../middlewares' 6import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoUpdateRateValidator } from '../../../middlewares'
7import { AccountModel } from '../../../models/account/account' 7import { AccountModel } from '../../../models/account/account'
8import { AccountVideoRateModel } from '../../../models/account/account-video-rate' 8import { AccountVideoRateModel } from '../../../models/account/account-video-rate'
9import { sequelizeTypescript } from '../../../initializers/database'
9 10
10const rateVideoRouter = express.Router() 11const rateVideoRouter = express.Router()
11 12