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:
@@ -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,
|
||||
|
||||
@@ -345,6 +345,7 @@ export interface ExportOptions {
|
||||
options?: {
|
||||
filename_format?: 'original' | 'picpeak';
|
||||
separator?: 'newline' | 'comma' | 'semicolon';
|
||||
include_extension?: boolean;
|
||||
include_rating?: boolean;
|
||||
include_label?: boolean;
|
||||
include_description?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user