diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-02 15:34:09 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-06 11:19:16 +0200 |
commit | fbad87b0472f574409f7aa3ae7f8b54927d0cdd6 (patch) | |
tree | 197b4209e75d57dabae7cdd6f2da5f765e427023 /server/controllers/api/videos/index.ts | |
parent | 5e319fb7898fd0482c399cc3ae9dcfc20d274a58 (diff) | |
download | PeerTube-fbad87b0472f574409f7aa3ae7f8b54927d0cdd6.tar.gz PeerTube-fbad87b0472f574409f7aa3ae7f8b54927d0cdd6.tar.zst PeerTube-fbad87b0472f574409f7aa3ae7f8b54927d0cdd6.zip |
Add ability to import video with youtube-dl
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r-- | server/controllers/api/videos/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index e396ee6be..c9365da08 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -54,6 +54,7 @@ import { VideoFilter } from '../../../../shared/models/videos/video-query.type' | |||
54 | import { createReqFiles, buildNSFWFilter } from '../../../helpers/express-utils' | 54 | import { createReqFiles, buildNSFWFilter } from '../../../helpers/express-utils' |
55 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' | 55 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' |
56 | import { videoCaptionsRouter } from './captions' | 56 | import { videoCaptionsRouter } from './captions' |
57 | import { videoImportsRouter } from './import' | ||
57 | 58 | ||
58 | const auditLogger = auditLoggerFactory('videos') | 59 | const auditLogger = auditLoggerFactory('videos') |
59 | const videosRouter = express.Router() | 60 | const videosRouter = express.Router() |
@@ -81,6 +82,7 @@ videosRouter.use('/', blacklistRouter) | |||
81 | videosRouter.use('/', rateVideoRouter) | 82 | videosRouter.use('/', rateVideoRouter) |
82 | videosRouter.use('/', videoCommentRouter) | 83 | videosRouter.use('/', videoCommentRouter) |
83 | videosRouter.use('/', videoCaptionsRouter) | 84 | videosRouter.use('/', videoCaptionsRouter) |
85 | videosRouter.use('/', videoImportsRouter) | ||
84 | 86 | ||
85 | videosRouter.get('/categories', listVideoCategories) | 87 | videosRouter.get('/categories', listVideoCategories) |
86 | videosRouter.get('/licences', listVideoLicences) | 88 | videosRouter.get('/licences', listVideoLicences) |
@@ -160,7 +162,6 @@ async function addVideo (req: express.Request, res: express.Response) { | |||
160 | const videoData = { | 162 | const videoData = { |
161 | name: videoInfo.name, | 163 | name: videoInfo.name, |
162 | remote: false, | 164 | remote: false, |
163 | extname: extname(videoPhysicalFile.filename), | ||
164 | category: videoInfo.category, | 165 | category: videoInfo.category, |
165 | licence: videoInfo.licence, | 166 | licence: videoInfo.licence, |
166 | language: videoInfo.language, | 167 | language: videoInfo.language, |