mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-07-14 16:51:10 +00:00
Fix bulk import: group tagless files by folder, use folder name as search fallback
This commit is contained in:
@@ -39,7 +39,12 @@ function BookRow({
|
||||
const isDisabled = book.inLibrary || book.hasActiveRequest;
|
||||
const isSkipped = book.skipped;
|
||||
const hasMatch = book.match !== null;
|
||||
const isLowConfidence = book.metadataSource === 'file_name';
|
||||
// Low confidence when search term came from a filename or folder name fallback,
|
||||
// BUT not when an ASIN was extracted directly from the folder name (that's a
|
||||
// direct lookup and is as reliable as embedded metadata tags).
|
||||
const isLowConfidence =
|
||||
(book.metadataSource === 'file_name' || book.metadataSource === 'folder_name') &&
|
||||
!book.extractedAsin;
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -34,7 +34,9 @@ export interface ScannedBook {
|
||||
relativePath: string;
|
||||
audioFileCount: number;
|
||||
totalSizeBytes: number;
|
||||
metadataSource: 'tags' | 'file_name';
|
||||
metadataSource: 'tags' | 'folder_name' | 'file_name';
|
||||
/** ASIN extracted directly from the folder name, if present. */
|
||||
extractedAsin?: string;
|
||||
searchTerm: string;
|
||||
audioFiles: string[];
|
||||
match: AudibleMatch | null;
|
||||
|
||||
Reference in New Issue
Block a user