fix(admin/exports): Lightroom TXT export joins with comma + drops extension (#623)

The PhotoExportMenu's TXT format advertises "Simple text list for Lightroom
search" but emitted newline-separated filenames WITH `.jpg`. Lightroom's
filename search wants a comma-separated one-liner, and the gallery JPEGs may
correspond to RAW files in the catalog — so the search has to match on the
stem only.

The frontend now passes `separator: 'comma'` + `include_extension: false` for
the TXT format specifically. The backend gains an `include_extension` option
(defaulting to true so direct API consumers don't break), and the comma case
joins without a trailing space (the form Lightroom expects). Unit test pins
the Lightroom-mode output AND the backward-compatible default for any direct
API caller.

CSV / XMP / JSON exports are unchanged.
This commit is contained in:
Paul Nothaft
2026-06-17 22:25:12 +02:00
parent f279771ee8
commit a239fec9d7
4 changed files with 98 additions and 6 deletions
@@ -64,6 +64,11 @@ export const PhotoExportMenu: React.FC<PhotoExportMenuProps> = ({
format,
options: {
filename_format: 'original',
// TXT is labelled "for Lightroom search" — Lightroom's filename
// search field takes one comma-separated line, and the gallery
// JPEGs may correspond to RAW files in the catalog so the search
// has to match on the stem only (issue #623).
...(format === 'txt' ? { separator: 'comma' as const, include_extension: false } : {}),
include_rating: true,
include_label: true,
include_description: true,