1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

add quarantine videos feature (#1637)

* add quarantine videos feature

* increase Notification settings test timeout

to 20000ms. was completing 7000 locally but timing out
after 10000 on travis

* fix quarantine video test issues

-propagate misspelling
-remove skip from server/tests/client.ts

* WIP use blacklist for moderator video approval

instead of video.quarantine boolean

* finish auto-blacklist feature
This commit is contained in:
Josh Morel 2019-04-02 05:26:47 -04:00 committed by Chocobozzz
parent 12fed49eba
commit 7ccddd7b52
58 changed files with 1047 additions and 99 deletions

View file

@ -85,10 +85,9 @@ async function publishVideoIfNeeded (video: VideoModel, payload?: VideoTranscodi
return { videoDatabase, videoPublished }
})
// don't notify prior to scheduled video update
if (videoPublished && !videoDatabase.ScheduleVideoUpdate) {
if (videoPublished) {
Notifier.Instance.notifyOnNewVideo(videoDatabase)
Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
Notifier.Instance.notifyOnVideoPublishedAfterTranscoding(videoDatabase)
}
await createHlsJobIfEnabled(payload)
@ -146,11 +145,8 @@ async function onVideoFileOptimizerSuccess (videoArg: VideoModel, payload: Video
return { videoDatabase, videoPublished }
})
// don't notify prior to scheduled video update
if (!videoDatabase.ScheduleVideoUpdate) {
if (payload.isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase)
if (videoPublished) Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
}
if (payload.isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase)
if (videoPublished) Notifier.Instance.notifyOnVideoPublishedAfterTranscoding(videoDatabase)
await createHlsJobIfEnabled(Object.assign({}, payload, { resolution: videoDatabase.getOriginalFile().resolution }))
}