diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-19 10:34:56 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-19 10:53:16 +0100 |
commit | e12a009254de33bcdbd8334992980fa029c3e10d (patch) | |
tree | 85c6b576d9f76fee33b22e1fdbdca5e9daa24d50 /server/lib/jobs/transcoding-job-scheduler | |
parent | ce33ee01cd3806201b676c318e9aa930032921b2 (diff) | |
download | PeerTube-e12a009254de33bcdbd8334992980fa029c3e10d.tar.gz PeerTube-e12a009254de33bcdbd8334992980fa029c3e10d.tar.zst PeerTube-e12a009254de33bcdbd8334992980fa029c3e10d.zip |
Status are sent to mastodon
Diffstat (limited to 'server/lib/jobs/transcoding-job-scheduler')
-rw-r--r-- | server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts | 9 | ||||
-rw-r--r-- | server/lib/jobs/transcoding-job-scheduler/video-file-transcoder-handler.ts | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts b/server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts index 47b12e66f..d905882be 100644 --- a/server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts +++ b/server/lib/jobs/transcoding-job-scheduler/video-file-optimizer-handler.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import * as Bluebird from 'bluebird' | 1 | import * as Bluebird from 'bluebird' |
2 | import { VideoPrivacy } from '../../../../shared/models/videos' | ||
2 | import { computeResolutionsToTranscode, logger } from '../../../helpers' | 3 | import { computeResolutionsToTranscode, logger } from '../../../helpers' |
3 | import { sequelizeTypescript } from '../../../initializers' | 4 | import { sequelizeTypescript } from '../../../initializers' |
4 | import { VideoModel } from '../../../models/video/video' | 5 | import { VideoModel } from '../../../models/video/video' |
@@ -35,9 +36,11 @@ async function onSuccess (jobId: number, video: VideoModel, jobScheduler: JobSch | |||
35 | // Video does not exist anymore | 36 | // Video does not exist anymore |
36 | if (!videoDatabase) return undefined | 37 | if (!videoDatabase) return undefined |
37 | 38 | ||
38 | // Now we'll add the video's meta data to our followers | 39 | if (video.privacy !== VideoPrivacy.PRIVATE) { |
39 | await sendCreateVideo(video, undefined) | 40 | // Now we'll add the video's meta data to our followers |
40 | await shareVideoByServerAndChannel(video, undefined) | 41 | await sendCreateVideo(video, undefined) |
42 | await shareVideoByServerAndChannel(video, undefined) | ||
43 | } | ||
41 | 44 | ||
42 | const originalFileHeight = await videoDatabase.getOriginalFileHeight() | 45 | const originalFileHeight = await videoDatabase.getOriginalFileHeight() |
43 | 46 | ||
diff --git a/server/lib/jobs/transcoding-job-scheduler/video-file-transcoder-handler.ts b/server/lib/jobs/transcoding-job-scheduler/video-file-transcoder-handler.ts index 8957b4565..409123bfe 100644 --- a/server/lib/jobs/transcoding-job-scheduler/video-file-transcoder-handler.ts +++ b/server/lib/jobs/transcoding-job-scheduler/video-file-transcoder-handler.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import { VideoResolution } from '../../../../shared' | 1 | import { VideoResolution } from '../../../../shared' |
2 | import { VideoPrivacy } from '../../../../shared/models/videos' | ||
2 | import { logger } from '../../../helpers' | 3 | import { logger } from '../../../helpers' |
3 | import { VideoModel } from '../../../models/video/video' | 4 | import { VideoModel } from '../../../models/video/video' |
4 | import { sendUpdateVideo } from '../../activitypub/send' | 5 | import { sendUpdateVideo } from '../../activitypub/send' |
@@ -31,7 +32,9 @@ async function onSuccess (jobId: number, video: VideoModel) { | |||
31 | // Video does not exist anymore | 32 | // Video does not exist anymore |
32 | if (!videoDatabase) return undefined | 33 | if (!videoDatabase) return undefined |
33 | 34 | ||
34 | await sendUpdateVideo(video, undefined) | 35 | if (video.privacy !== VideoPrivacy.PRIVATE) { |
36 | await sendUpdateVideo(video, undefined) | ||
37 | } | ||
35 | 38 | ||
36 | return undefined | 39 | return undefined |
37 | } | 40 | } |