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
+3 -3
View File
@@ -82,7 +82,7 @@ pub(super) fn refresh_timeline(window: &AppWindow, catalog: &Catalog, ctl: &Rc<L
// Scoped to whatever the grid is showing. A collection's histogram drawn
// over the whole library's span said almost nothing: every bar for a
// fortnight in Arosa landed in one column of a fifteen-year axis.
let scope = *ctl.scope.borrow();
let scope = ctl.grid_scope();
let filter = ctl.filter.borrow().clone();
// Passed whole, date range included, and both queries below lift that
// range themselves — see `span_scoped` and `timeline_uniform`. Every other
@@ -376,7 +376,7 @@ pub(super) fn catalog_span(catalog: &Catalog, ctl: &Rc<LibraryController>) -> Op
// through the range, narrowing it would move the ground under the very
// handles doing the narrowing — each drag re-scaling the axis, so the next
// one meant something else.
library::span_scoped(catalog, *ctl.scope.borrow(), &ctl.filter.borrow())
library::span_scoped(catalog, ctl.grid_scope(), &ctl.filter.borrow())
}
/// TRACES: NFR-P5
@@ -848,7 +848,7 @@ fn resolve_place(
if !place.path.is_empty() {
match library::ordinal_of_path(
catalog,
*ctl.scope.borrow(),
ctl.grid_scope(),
&ctl.filter.borrow(),
ctl.viewing_trash.get(),
&place.path,