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:
1 parent
704c1ed9cf
commit
b746aff45d
19 files changed
+1941
-257
No files matched your search
@@ -2,6 +2,7 @@ using System.Security.Cryptography;
|
||||
using Febe.Core.Abstractions;
|
||||
using Febe.Core.Domain;
|
||||
using Febe.Core.Library;
|
||||
using Febe.Core.Library.Conversion;
|
||||
using Febe.Core.Storage;
|
||||
|
||||
namespace Febe.Core.Export;
|
||||
@@ -61,6 +62,9 @@ public sealed record ExportEnvironment
|
||||
/// <summary>…or this many planned bytes, whichever comes first.</summary>
|
||||
public long GroupBytes { get; init; } = 1L << 30;
|
||||
|
||||
/// <summary>One conversion at a time in the process (tappa E3, D16): shared with the library conversion.</summary>
|
||||
public ConversionThrottle Throttle { get; init; } = ConversionThrottle.Shared;
|
||||
|
||||
/// <summary>The checker of destination folders of this environment.</summary>
|
||||
public ExportFolderCheck CreateFolderCheck() => new(Root.Mounts, FolderCheckTimeout, WriteProbe);
|
||||
|
||||
@@ -101,6 +105,12 @@ public interface IExportFileSystem
|
||||
/// <summary>Opens a file for reading only.</summary>
|
||||
Stream OpenRead(string path);
|
||||
|
||||
/// <summary>
|
||||
/// Opens a file for reading at any position (a video to remux or to take frames from, tappa E3). By default the
|
||||
/// stream of <see cref="OpenRead"/>, which can seek.
|
||||
/// </summary>
|
||||
Stream OpenRandomAccess(string path) => OpenRead(path);
|
||||
|
||||
/// <summary>SHA-256 (lowercase hex) of a file as it is on disk now.</summary>
|
||||
Task<string> ComputeSha256Async(string path, CancellationToken ct);
|
||||
|
||||
@@ -121,8 +131,13 @@ public sealed class ExportFileSystem : IExportFileSystem
|
||||
|
||||
public static ExportFileSystem Instance { get; } = new();
|
||||
|
||||
// FileShare.Delete: a long read never blocks «Elimina dalla libreria» on Windows (tappa E3).
|
||||
public Stream OpenRead(string path) =>
|
||||
new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, BufferSize, FileOptions.Asynchronous | FileOptions.SequentialScan);
|
||||
new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read | FileShare.Delete, BufferSize, FileOptions.Asynchronous | FileOptions.SequentialScan);
|
||||
|
||||
/// <summary>As <c>ContainerReader.OpenRead</c>: shared for reading, writing and deleting, read at random positions.</summary>
|
||||
public Stream OpenRandomAccess(string path) =>
|
||||
new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete, BufferSize, FileOptions.RandomAccess);
|
||||
|
||||
public async Task<string> ComputeSha256Async(string path, CancellationToken ct)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user