feat: single setup, mass-pass progress, per-server homes, Desktop shares its library (owner review 5, v1.1.0) (#68)
CI / Build and test (push) Successful in 11m36s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 12s
Release / Build, test and publish (push) Successful in 14m56s
CI / PostgreSQL 16 integration (push) Successful in 10m11s
CI / PostgreSQL 17 integration (push) Successful in 10m15s
CI / Docker image (push) Successful in 45s
Release / Server image (push) Successful in 4m55s
CI / Build and test (push) Successful in 11m36s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 12s
Release / Build, test and publish (push) Successful in 14m56s
CI / PostgreSQL 16 integration (push) Successful in 10m11s
CI / PostgreSQL 17 integration (push) Successful in 10m15s
CI / Docker image (push) Successful in 45s
Release / Server image (push) Successful in 4m55s
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #68.
This commit is contained in:
1 parent
988068ee8e
commit
20d64af4a4
793 files changed
+23882
-2096
No files matched your search
@@ -39,7 +39,8 @@ internal sealed class VideoCopyJobHandler(ChronosDatabase db, VideoLibrary libra
|
||||
? int.Min(done, ids.Count)
|
||||
: 0;
|
||||
foreach (var id in ids.Skip(start)) Remove(VideosFolder.PartPath(folder, id));
|
||||
await context.ReportAsync(start, ids.Count, Loc.L("Videos.Job.Copying")).ConfigureAwait(false);
|
||||
// The detail is the copy's step and video n of m; the message keeps the host's words for the desktop's log line.
|
||||
await context.ReportAsync(start, ids.Count, new JobDetail(JobStep.CopyVideo), Loc.L("Videos.Job.Copying")).ConfigureAwait(false);
|
||||
|
||||
using var remote = parameters.FromServer ? await ConnectAsync(parameters, ct).ConfigureAwait(false) : null;
|
||||
var sources = new List<Source?>(ids.Count);
|
||||
@@ -58,9 +59,11 @@ internal sealed class VideoCopyJobHandler(ChronosDatabase db, VideoLibrary libra
|
||||
{
|
||||
failed++;
|
||||
}
|
||||
else if (!await CopyAsync(context, parameters, remote, source, ct).ConfigureAwait(false))
|
||||
else
|
||||
{
|
||||
failed++;
|
||||
await context.ReportAsync(i, ids.Count, new JobDetail(JobStep.CopyVideo, source.Name, 0, 0, i + 1, ids.Count, JobPartUnit.Render),
|
||||
Loc.L("Videos.Job.Copying")).ConfigureAwait(false);
|
||||
if (!await CopyAsync(context, parameters, remote, source, ct).ConfigureAwait(false)) failed++;
|
||||
}
|
||||
await context.CheckpointAsync(Prefix + (i + 1).ToString(CultureInfo.InvariantCulture), i + 1, ids.Count).ConfigureAwait(false);
|
||||
}
|
||||
@@ -101,7 +104,8 @@ internal sealed class VideoCopyJobHandler(ChronosDatabase db, VideoLibrary libra
|
||||
if (sha is null)
|
||||
{
|
||||
// A render of before migration 0010: hashed now, and remembered.
|
||||
await context.ReportAsync(context.Done, context.Total, Loc.L("Videos.Job.Verifying")).ConfigureAwait(false);
|
||||
await context.ReportAsync(context.Done, context.Total, new JobDetail(JobStep.Verify, item.FileName, 0, 0, index + 1, parameters.RenderIds.Count,
|
||||
JobPartUnit.Render), Loc.L("Videos.Job.Verifying")).ConfigureAwait(false);
|
||||
sha = await ContentHash.Sha256Async(item.FullPath, cancellationToken: ct).ConfigureAwait(false);
|
||||
await db.Renders.SetSha256Async(id, sha, CancellationToken.None).ConfigureAwait(false);
|
||||
}
|
||||
@@ -206,7 +210,9 @@ internal sealed class VideoCopyJobHandler(ChronosDatabase db, VideoLibrary libra
|
||||
/// <summary>The SHA-256 of the copy at <paramref name="path"/> when it matches <paramref name="expected"/> (any, when none is known); null otherwise.</summary>
|
||||
private static async Task<string?> Verified(string path, string? expected, JobContext context, CancellationToken ct)
|
||||
{
|
||||
await context.ReportAsync(context.Done, context.Total, Loc.L("Videos.Job.Verifying")).ConfigureAwait(false);
|
||||
// The copy of the same video, now checked.
|
||||
var detail = context.Detail is { } copying ? copying with { Step = JobStep.Verify } : new JobDetail(JobStep.Verify);
|
||||
await context.ReportAsync(context.Done, context.Total, detail, Loc.L("Videos.Job.Verifying")).ConfigureAwait(false);
|
||||
var sha = await ContentHash.Sha256Async(path, cancellationToken: ct).ConfigureAwait(false);
|
||||
return expected is null || string.Equals(sha, expected, StringComparison.OrdinalIgnoreCase) ? sha : null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user