fix: invert reversed storage guard condition in MP4 finalization
The ternary in GetLowStoragePauseMessageAsync had its branches swapped: when storage was healthy it returned the pause error, and when storage was critically low it returned null (allowing finalization to proceed). This caused MP4 finalization to always pause with a misleading 'storage is Red' warning even when storage protection was disabled.
This commit is contained in:
+15
-2
@@ -16,7 +16,13 @@ services:
|
|||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|
||||||
api:
|
api:
|
||||||
image: ${REGISTRY_URL:-reg.nxsir.cn}/live_recorder/app-api:latest
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: src/LiveRecorder.WebApi/Dockerfile
|
||||||
|
network: host
|
||||||
|
args:
|
||||||
|
DOTNET_SDK_IMAGE: ${DOTNET_SDK_IMAGE:-mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim}
|
||||||
|
DOTNET_RUNTIME_IMAGE: ${DOTNET_RUNTIME_IMAGE:-mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
@@ -32,7 +38,14 @@ services:
|
|||||||
- "8080"
|
- "8080"
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: ${REGISTRY_URL:-reg.nxsir.cn}/live_recorder/app-web:latest
|
build:
|
||||||
|
context: ./frontend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
network: host
|
||||||
|
args:
|
||||||
|
NODE_IMAGE: ${NODE_IMAGE:-node:22-alpine}
|
||||||
|
NGINX_IMAGE: ${NGINX_IMAGE:-nginx:1.27-alpine}
|
||||||
|
VITE_API_BASE_URL: /api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ public sealed partial class FfmpegService
|
|||||||
var sourceSizeBytes = new FileInfo(sourcePath).Length;
|
var sourceSizeBytes = new FileInfo(sourcePath).Length;
|
||||||
var storageCheck = _storageGuardService.CheckCanStartOrResume(settings, sourceSizeBytes);
|
var storageCheck = _storageGuardService.CheckCanStartOrResume(settings, sourceSizeBytes);
|
||||||
return storageCheck.ShouldPauseActive
|
return storageCheck.ShouldPauseActive
|
||||||
? null
|
? $"{LowStoragePauseErrorPrefix} {storageCheck.Message}"
|
||||||
: $"{LowStoragePauseErrorPrefix} {storageCheck.Message}";
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var lowStoragePauseMessage = await GetLowStoragePauseMessageAsync();
|
var lowStoragePauseMessage = await GetLowStoragePauseMessageAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user