Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix invalid state error on failed move job

Chocobozzzcec10ade9790
diff --git a/server/core/lib/video-state.ts b/server/core/lib/video-state.ts
index 27bffbf814..d04fb36ba8 100644
--- a/server/core/lib/video-state.ts
+++ b/server/core/lib/video-state.ts
@@ -74,8 +74,13 @@ export function moveToNextState (options: {
return true
}
- // Keep video in failed transcoding state
- if (videoDatabase.state === VideoState.TRANSCODING_FAILED) {
+ // Keep video in failed state
+ const failedStates = new Set<VideoStateType>([
+ VideoState.TRANSCODING_FAILED,
+ VideoState.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED,
+ VideoState.TO_MOVE_TO_FILE_SYSTEM_FAILED
+ ])
+ if (failedStates.has(videoDatabase.state)) {
return true
}