E3: formati e fotogrammi nella copia verso le cartelle esterne

La richiesta di copia porta i formati («Copia in…» per foto e video, poi
la destinazione, poi le impostazioni), i fotogrammi dei video e la «Copia
di nuovo» di una sola copia. Il piano prevede convertiti, copiati com'è e
fotogrammi; il lavoro si ricorda di fotogrammi ed identità esatta per la
ripresa.

La copia converte prima dei controlli di spazio e di FAT32, adotta un file
già presente solo se lunghezza e SHA-256 della conversione coincidono, e
prende i fotogrammi di un video in un solo passaggio, ognuno con il suo
istante esatto come identità. Un file copiato in qualunque forma che non
sia un fotogramma è «già copiato»; un fotogramma non rende mai copiato il
file (nuovo segno FrameOnly). Le note sono un elenco di codici, con i testi
italiani nuovi e il rapporto che mostra i file copiati con una nota.

Le prove dell'archivio e dei piani delle query seguono le nuove ricerche;
due prove nuove coprono una foto convertita e un fotogramma.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-27 23:08:38 +01:00
1 parent 704c1ed9cf
commit b746aff45d
19 files changed
+1941 -257

No files matched your search

+18 -1
View File
@@ -15,6 +15,8 @@ namespace Febe.Core.Export;
/// <param name="ProfileNamingScheme">Scheme of profile pictures; null: «Come la libreria».</param>
/// <param name="Automatic">«Automatica»: stored only in tappa E2 (tappa E5 acts on it).</param>
/// <param name="OnlyNew">«Solo i nuovi» when «Automatica» is turned on.</param>
/// <param name="PhotoFormat">Format of the copies of photos here; null: «Come le impostazioni generali» (tappa E3, D1).</param>
/// <param name="VideoFormat">Format of the copies of videos here (Original or Mp4); null: «Come le impostazioni generali».</param>
public sealed record DestinationSpec(
ExportScope Scope,
long? AccountId,
@@ -25,7 +27,9 @@ public sealed record DestinationSpec(
string? HighlightNamingScheme,
string? ProfileNamingScheme,
bool Automatic = false,
bool OnlyNew = true);
bool OnlyNew = true,
ExportFormat? PhotoFormat = null,
ExportFormat? VideoFormat = null);
/// <summary>A saved destination and the warnings of its naming schemes (shown, they do not block).</summary>
public sealed record DestinationSaveResult(ExportDestination Destination, IReadOnlyList<string> Warnings);
@@ -347,6 +351,17 @@ public sealed class ExportDestinations(ExportEnvironment env)
throw new ArgumentException("Scegli almeno un tipo di contenuto.", nameof(spec));
}
// A change of format is not a new folder: the copies already made stay «già copiato» (D3 of tappa E3).
if (spec.PhotoFormat is { } photo && !ExportFormats.IsPhotoFormat(photo))
{
throw new ArgumentException("Per le foto si sceglie Originale, JPG, PNG o WEBP senza perdita.", nameof(spec));
}
if (spec.VideoFormat is { } video && !ExportFormats.IsVideoFormat(video))
{
throw new ArgumentException("Per i video si sceglie Originale o MP4.", nameof(spec));
}
var errors = new List<string>();
var warnings = new List<string>();
void Check(string? text, NamingSchemeUse use)
@@ -392,6 +407,8 @@ public sealed class ExportDestinations(ExportEnvironment env)
NamingScheme = Clean(spec.NamingScheme),
HighlightNamingScheme = Clean(spec.HighlightNamingScheme),
ProfileNamingScheme = Clean(spec.ProfileNamingScheme),
PhotoFormat = spec.PhotoFormat,
VideoFormat = spec.VideoFormat,
Automatic = spec.Automatic,
CreatedAt = createdAt,
};