E2: API delle copie esterne, composizione e dimostrazione
Le copie esterne diventano usabili dall'interfaccia: ExportHub costruisce l'unico ExportService del web (segna «interrotto» ciò che l'arresto ha fermato e avvisa le pagine a lavoro finito), ExportApi espone cartelle, scelta e controllo della cartella, «Copia in…» (piano e avvio), «Copia di nuovo», avanzamento, lavori, ripresa, annullamento e resoconto. Gli endpoint esistenti portano le copie: filtro copies= della Libreria, segno «Copiato» / «Copiato in parte 1/3» sulle tessere, copie di ogni file nel visualizzatore, riquadro «Copie esterne» e interruttore «Esporta questo account» nella scheda. Una cartella di account o della libreria che finirebbe dentro (o attorno a) una cartella delle copie è rifiutata; dopo una ricostruzione le cartelle in conflitto vanno in pausa. Composizione: in Docker le copie si scrivono solo sotto /esporta, e solo con --esporta/FEBE_ESPORTA e un montaggio (riga di avvio e avviso se manca); sul desktop qualsiasi cartella con la finestra del sistema e lo spazio libero misurato anche sulle condivisioni di rete. La dimostrazione ha una cartella generale, una propria, un account non esportato e copie vere in ogni stato, scritte dal motore nella sua cartella temporanea. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a112c92893
commit
4a7925ad23
30 files changed
+2299
-32
No files matched your search
@@ -216,6 +216,12 @@ public interface IExportStore
|
||||
/// </summary>
|
||||
Task<IReadOnlyDictionary<long, ExportMark>> GetEntryMarksAsync(IReadOnlyList<long> entryIds, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// As <see cref="GetEntryMarksAsync"/>, with the numbers behind the mark (the «1/3» of «Copiato in parte»): the due
|
||||
/// files of each entry and how many of them are copied. Entries without due files are absent.
|
||||
/// </summary>
|
||||
Task<IReadOnlyDictionary<long, ExportEntryCopies>> GetEntryCopyCountsAsync(IReadOnlyList<long> entryIds, CancellationToken ct = default);
|
||||
|
||||
/// <summary>The mark of single files («Tutte le foto»): Copied or None; files that are not due are absent.</summary>
|
||||
Task<IReadOnlyDictionary<long, ExportMark>> GetFileMarksAsync(IReadOnlyList<long> mediaIds, CancellationToken ct = default);
|
||||
|
||||
@@ -245,6 +251,13 @@ public enum ExportMark
|
||||
Copied,
|
||||
}
|
||||
|
||||
/// <summary>The due files of an entry and how many are copied (decision D3 of tappa E2).</summary>
|
||||
public sealed record ExportEntryCopies(int Due, int Copied)
|
||||
{
|
||||
/// <summary>«Non ancora copiato» (none), «Copiato in parte», «Copiato».</summary>
|
||||
public ExportMark Mark => Copied <= 0 ? ExportMark.None : Copied >= Due ? ExportMark.Copied : ExportMark.Partly;
|
||||
}
|
||||
|
||||
/// <summary>Counts of the due files of an account (decision D3 of tappa E2).</summary>
|
||||
/// <param name="Due">Files that go to the account's effective destination.</param>
|
||||
/// <param name="NotCopied">Due files «Copia in…» would copy: neither copied nor «Tolti o superati» (failed ones included).</param>
|
||||
|
||||
Reference in new issue
Block a user