Unione dell'ondata 4 (interfaccia parte 2, server reale e Docker): impostazioni del motore, anteprima del browser e schema dei nomi collegati al server reale; decisioni consolidate
verifica / prove (push) Successful in 18m40s
verifica / prove (push) Successful in 18m40s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
39 files changed
+6228
-12
No files matched your search
@@ -88,6 +88,19 @@ public sealed class LibraryIngest(
|
||||
SafeFileWriter? writer = null)
|
||||
{
|
||||
private readonly SafeFileWriter _writer = writer ?? new SafeFileWriter(layout.MaxPathLength);
|
||||
private volatile LibraryNaming _naming = naming;
|
||||
private volatile bool _setFileTimeToPublication = setFileTimeToPublication;
|
||||
|
||||
/// <summary>
|
||||
/// Applies new naming schemes and the file-time choice from the settings page. They hold for the next files only:
|
||||
/// files already saved are never renamed (spec §4.7).
|
||||
/// </summary>
|
||||
public void Apply(LibraryNaming newNaming, bool newSetFileTimeToPublication)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(newNaming);
|
||||
_naming = newNaming;
|
||||
_setFileTimeToPublication = newSetFileTimeToPublication;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stores one file of an entry already recorded in the database (<paramref name="media"/> must have its key).
|
||||
@@ -121,7 +134,7 @@ public sealed class LibraryIngest(
|
||||
}
|
||||
|
||||
var folder = layout.AccountFolder(account);
|
||||
var scheme = naming.For(entry.Kind);
|
||||
var scheme = _naming.For(entry.Kind);
|
||||
var zone = clock.LocalZone;
|
||||
var provisional = content.FixedRelativePath is { } fixedPath
|
||||
? LibraryLayout.ToStored(fixedPath)
|
||||
@@ -153,7 +166,7 @@ public sealed class LibraryIngest(
|
||||
},
|
||||
new SafeWriteOptions
|
||||
{
|
||||
LastWriteTime = setFileTimeToPublication ? entry.PublishedAt : null,
|
||||
LastWriteTime = _setFileTimeToPublication ? entry.PublishedAt : null,
|
||||
MaxBytes = content.MaxBytes,
|
||||
},
|
||||
ct).ConfigureAwait(false);
|
||||
|
||||
Reference in new issue
Block a user