aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-state.ts
diff options
context:
space:
mode:
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>2021-11-08 04:20:04 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-11-09 15:00:21 +0100
commit4e29f4fe23b413cc8c55ac0d8373f36bcd60b47a (patch)
treec9e63dac52672d46cbf0072dc35e396dca61079c /server/lib/video-state.ts
parent9c391612038cd48cfeb2315dcbb8feddcf877d94 (diff)
downloadPeerTube-4e29f4fe23b413cc8c55ac0d8373f36bcd60b47a.tar.gz
PeerTube-4e29f4fe23b413cc8c55ac0d8373f36bcd60b47a.tar.zst
PeerTube-4e29f4fe23b413cc8c55ac0d8373f36bcd60b47a.zip
video: add video stranscoding_failed state
Diffstat (limited to 'server/lib/video-state.ts')
-rw-r--r--server/lib/video-state.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/lib/video-state.ts b/server/lib/video-state.ts
index d5bbbec43..2260e90f5 100644
--- a/server/lib/video-state.ts
+++ b/server/lib/video-state.ts
@@ -79,11 +79,18 @@ async function moveToExternalStorageState (video: MVideoFullLight, isNewVideo: b
79 } 79 }
80} 80}
81 81
82function moveToFailedState (video: MVideoFullLight) {
83 return sequelizeTypescript.transaction(async t => {
84 await video.setNewState(VideoState.TRANSCODING_FAILED, false, t)
85 })
86}
87
82// --------------------------------------------------------------------------- 88// ---------------------------------------------------------------------------
83 89
84export { 90export {
85 buildNextVideoState, 91 buildNextVideoState,
86 moveToExternalStorageState, 92 moveToExternalStorageState,
93 moveToFailedState,
87 moveToNextState 94 moveToNextState
88} 95}
89 96