aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-15 17:34:38 +0100
committerChocobozzz <me@florianbigard.com>2017-12-19 10:53:16 +0100
commita7d647c4403f8774106f485e8d9323158454e111 (patch)
treefcba0e03ce3ac2bf1cc7607a1643ffd1bc206c2b /server/controllers/api/videos/index.ts
parent50d6de9c286abcb34ff4234d56d9cbb803db7665 (diff)
downloadPeerTube-a7d647c4403f8774106f485e8d9323158454e111.tar.gz
PeerTube-a7d647c4403f8774106f485e8d9323158454e111.tar.zst
PeerTube-a7d647c4403f8774106f485e8d9323158454e111.zip
Add dirty migration :/
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index d6934748f..3e65e844b 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -21,7 +21,11 @@ import {
21 VIDEO_MIMETYPE_EXT, 21 VIDEO_MIMETYPE_EXT,
22 VIDEO_PRIVACIES 22 VIDEO_PRIVACIES
23} from '../../../initializers' 23} from '../../../initializers'
24import { fetchRemoteVideoDescription, getVideoActivityPubUrl, shareVideoByServer } from '../../../lib/activitypub' 24import {
25 fetchRemoteVideoDescription,
26 getVideoActivityPubUrl,
27 shareVideoByServerAndChannel
28} from '../../../lib/activitypub'
25import { sendCreateVideo, sendCreateViewToOrigin, sendCreateViewToVideoFollowers, sendUpdateVideo } from '../../../lib/activitypub/send' 29import { sendCreateVideo, sendCreateViewToOrigin, sendCreateViewToVideoFollowers, sendUpdateVideo } from '../../../lib/activitypub/send'
26import { transcodingJobScheduler } from '../../../lib/jobs/transcoding-job-scheduler' 30import { transcodingJobScheduler } from '../../../lib/jobs/transcoding-job-scheduler'
27import { 31import {
@@ -249,7 +253,7 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi
249 253
250 await sendCreateVideo(video, t) 254 await sendCreateVideo(video, t)
251 // TODO: share by video channel 255 // TODO: share by video channel
252 await shareVideoByServer(video, t) 256 await shareVideoByServerAndChannel(video, t)
253 257
254 logger.info('Video with name %s and uuid %s created.', videoInfo.name, videoCreated.uuid) 258 logger.info('Video with name %s and uuid %s created.', videoInfo.name, videoCreated.uuid)
255 259
@@ -306,7 +310,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
306 if (wasPrivateVideo === true && videoInstanceUpdated.privacy !== VideoPrivacy.PRIVATE) { 310 if (wasPrivateVideo === true && videoInstanceUpdated.privacy !== VideoPrivacy.PRIVATE) {
307 await sendCreateVideo(videoInstanceUpdated, t) 311 await sendCreateVideo(videoInstanceUpdated, t)
308 // TODO: Send by video channel 312 // TODO: Send by video channel
309 await shareVideoByServer(videoInstanceUpdated, t) 313 await shareVideoByServerAndChannel(videoInstanceUpdated, t)
310 } 314 }
311 }) 315 })
312 316