E4: la ricerca dei video fermi riprova chi era troppo lento e non trattiene la chiusura

«Avviala dalla selezione» mandava a una selezione che saltava il video; un file in due account si cercava solo nel
primo; un avvio di video già in coda sembrava una ricerca nuova; una lettura ferma bloccava la chiusura di Febe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-01 18:57:57 +01:00
1 parent 9277e0a18c
commit 6dcaf30db6
10 files changed
+293 -30

No files matched your search

+4 -2
View File
@@ -393,7 +393,8 @@ public sealed record StillVideosPlanDto(int Videos, int ToAnalyse, int AlreadyAn
/// <paramref name="Done"/> of <paramref name="Total"/> settled as <paramref name="Still"/>, <paramref name="Moving"/>,
/// <paramref name="NotAnalyzable"/> or <paramref name="Skipped"/> (file gone or changed); <paramref name="Stopped"/>:
/// ended by «Interrompi»; <paramref name="Waiting"/>: why it waits now; <paramref name="CurrentMediaId"/>: the file analysed
/// now; <paramref name="Summary"/>: «Analizzati 28 video: 3 fermi, 24 in movimento, 1 non analizzabile».
/// now; <paramref name="Summary"/>: «Analizzati 28 video: 3 fermi, 24 in movimento, 1 non analizzabile»;
/// <paramref name="Added"/>: in the answer of start, the videos it added to the job (0 when all were queued already).
/// </summary>
public sealed record StillVideosProgressDto(
bool Running,
@@ -406,4 +407,5 @@ public sealed record StillVideosProgressDto(
bool Stopped,
string? Waiting,
long? CurrentMediaId,
string Summary);
string Summary,
int Added);
+3 -2
View File
@@ -34,7 +34,7 @@ public static class StillVideosApi
StillVideoAnswerKind.Analysed => ApiHttp.Json(Dto(answer.Analysis!, clock), FebeJsonContext.Default.StillVideoDto),
StillVideoAnswerKind.NotAVideo => throw new BadRequestException(answer.Message!),
StillVideoAnswerKind.SourceChanged => throw new ApiStatusException(409, answer.Message!),
StillVideoAnswerKind.TooSlow => throw new ApiStatusException(503, answer.Message!),
StillVideoAnswerKind.TooSlow or StillVideoAnswerKind.TooSlowKept => throw new ApiStatusException(503, answer.Message!),
_ => throw new NotFoundException(answer.Message ?? StillVideoText.NotFound),
};
});
@@ -122,7 +122,8 @@ public static class StillVideosApi
p.Stopped,
p.Waiting,
p.CurrentMediaId,
StillVideoText.Summary(p));
StillVideoText.Summary(p),
p.Added);
/// <summary>Exactly one selection, as «Copia in…» and «Fotogrammi…» take it.</summary>
private static ExportSelection Selection(StillVideosSelectionRequest body, IClock clock)
+2
View File
@@ -4,6 +4,7 @@ using Febe.Core.Alerts;
using Febe.Core.Engine;
using Febe.Core.Export;
using Febe.Core.Import;
using Febe.Core.Library;
using Febe.Core.Library.Conversion;
using Febe.Core.Library.StillVideos;
using Febe.Core.Storage;
@@ -123,6 +124,7 @@ public static class FebeWeb
Session = sp.GetRequiredService<IEngineSessionState>(),
// The demo serves one moving file for the videos it has no still file for: their SHA-256 is never that file's.
VerifySource = !options.Demo,
Analyser = sp.GetService<Func<string, TimeSpan, CancellationToken, StillVideoResult>>(), // tests only
Changed = accountId => changes.Publish(new LibraryChange(clock.Now, accountId, "fermi")),
Log = logger is null ? null : message => logger.LogWarning("{Message}", message),
});