Export to an album instead of a folder in the settings

Export took a path typed into the settings page, or a folder inside the
library on the server. The first is how exports end up somewhere nobody
looks; the second put JPEGs into the tree a scan catalogues, where they
came back as photographs beside the RAWs they were made from.

The destination is now an album (FR-EXP-10), chosen by name in the
export sheet. Albums are listed under the collections in the sidebar;
"+" there, or "New album…" in the sheet, opens a sheet for its name and
its folder — on this device through the platform's dialogue, or on the
server through the browser with "New folder". A server folder inside
the library is refused, and the sheet says why. Selecting an album
narrows the grid to the photographs behind its files: library::Scope
is Collection or Album, and scope_clause is the one place the two are
spelled, which also retires the two copies of the collection predicate
total_images_scoped and read_cells_scoped had inlined.

A batch resolves the album when it starts, and refuses in words when
none is chosen, it has gone, or its folder is local to another device.
Each item reports the image it came from, and the files written are
recorded against the album in one transaction when the batch ends.

A server album lives outside the library, so its queued uploads are
relative to the account root. That is a third line in the outbox's
.dest record rather than a leading slash, because a record written
before albums may carry a stray slash and must keep the meaning it was
written with.

An export folder set before albums becomes an album called "Exports"
on first open, so upgrading does not lose where exports were going.
The old destination fields stay in ExportSettings so older settings
files still read.
This commit is contained in:
2026-09-26 14:13:53 -04:00
parent 2eb06b1064
commit 7cbcacc02e
19 changed files with 1757 additions and 672 deletions
+13
View File
@@ -727,6 +727,18 @@ pub struct ExportSettings {
/// [`Self::destination`], where empty means "ask each time" because there
/// is no sensible folder to assume on a filesystem.
pub remote_destination: String,
/// TRACES: FR-EXP-10
/// The album exports go to, by its catalog uuid. Empty until one is
/// chosen, and an export with none is refused and says so.
///
/// This replaced [`Self::target`] and the two destination fields as what
/// the export sheet chooses: a destination is now a named album in the
/// catalog, which records what was exported into it. The three older
/// fields stay so a settings file written before albums still reads, and
/// so the first album can be made from the folder they named; the batch
/// fills them from the album when it runs.
pub album: String,
}
impl Default for ExportSettings {
@@ -748,6 +760,7 @@ impl Default for ExportSettings {
target: ExportTarget::default(),
destination: String::new(),
remote_destination: String::new(),
album: String::new(),
}
}
}