diff --git a/docs-developers/server/api/reference.md b/docs-developers/server/api/reference.md index eb7c67aa..80f65524 100644 --- a/docs-developers/server/api/reference.md +++ b/docs-developers/server/api/reference.md @@ -7726,9 +7726,9 @@ book path). [match dialog](#get-apiv1adminlibrariesidbookmatch) opens its search box with (`meta.SearchPrefill`). Always present (`""` for a book with nothing to say). It is the book's title and author, with these exceptions: - - When the tags look swapped or junk, or the title is a whole - `Author; Series; Book NN` leaf (an untagged book's), the folders' reading of - the path (`metadata.FromPathLayout`) replaces them. + - Swapped or junk tags use the path reading (`metadata.FromPathLayout`). + So does a title that repeats the book's own structured file or folder + name, from a tag or an older scan. - Swapped means the title is the author folder's name, or the author, cleaned of series and numbering, is the path's title. A tag that matches its own path fact is never swapped (`Dune/Dune` by Frank Herbert). @@ -7856,8 +7856,12 @@ stop it or wait for it to finish before unlinking". } ``` -A revert restores the value from what the last scan stored, with no rescan and no -disk access. Reverting an ASIN/ISBN falls back to any enrichment for it. +A revert restores the underlying value from the database, with no rescan and +no disk access. Reverting a community title in an `edited` request (the +default `source`) stores the restored title as an `edited` value when it passes +title validation, so later fills keep it (see +[Metadata overrides](../data-model.md#metadata-overrides-and-effective-values)). +Reverting an ASIN/ISBN falls back to any enrichment for it. **Making an other series the main one swaps them.** When an edit sets `series` to a series the book's `more_series` lists, in any spelling (case, accents, punctuation diff --git a/docs-developers/server/data-model.md b/docs-developers/server/data-model.md index d4f6f4db..6589c3e6 100644 --- a/docs-developers/server/data-model.md +++ b/docs-developers/server/data-model.md @@ -498,10 +498,10 @@ dates from 0001. Later migrations added these columns: [The first scan after updating](scanner.md#the-first-scan-after-updating)). When a count is left at revision 0, see [MP3 lengths](scanner.md#mp3-lengths). -- `tag_read_failed_at`: the `indexed_at` of the index whose primary file - ffprobe rejected during a backfill of names or tag hints, `NULL` until one - does. It counts only while it equals the row's `indexed_at`, so the book's - next index ends it without clearing the column. See +- `tag_read_failed_at`: the `indexed_at` of the index whose names or tag + hints a backfill could not read for good, `NULL` until one fails. It counts + only while it equals the row's `indexed_at`, so the book's next index ends it + without clearing the column. See [Backfills for a skipped book](scanner.md#backfills-for-a-skipped-book). - `ebook_path`: the book's ebook, library-relative, `''` for none. It is the one readable `.epub` beside the audio by `library.BookEbook`'s rule. @@ -616,7 +616,7 @@ chapters' `scanned_title` from their titles. See A scan also writes an `@rev` key (`catalog.scannedRevKey`). It is the revision of the name-reading rules the snapshot used: the path baseline -(`metadata.DeriveFromPath`) plus the tags over it. Today it is `5` +(`metadata.DeriveFromPath`) plus the tags over it. Today it is `6` (`catalog.scannedRev`). | Revision | What changed | What the next scan does with an older snapshot | @@ -625,6 +625,7 @@ of the name-reading rules the snapshot used: the path baseline | 3 (2.6.0) | A leaf named `Author; Series; Book NN[; Title]` came to state its series and position. | Reads a snapshot older than 3 with such a leaf once, and stamps an unflagged revision 1 or 2 snapshot, as [the scanner](scanner.md#a-leaf-that-states-its-series) describes. | | 4 (2.7.0) | The tag reading of 2.4.0 and 2.5.0: a series tag carrying its position, generic titles in every script, the MP4 narrator item, and a narrator tag over composer. | Reads once a snapshot older than 4 that may read otherwise (an MP4, a narrator, a splittable series tag, a non-ASCII letter in its title or path), and stamps the rest, as [the scanner](scanner.md#books-already-indexed) describes. | | 5 (2.7.0) | A book of several files stopped taking its first file's title tag over the album that tag extends. | Reads a folder book of more than one file once when its snapshot is older than 5, and its last file too where the title depends on it, as [the scanner](scanner.md#a-book-of-several-files-title) describes. | +| 6 (2.7.0) | The scanner reads a structured leaf's title part, author and `Books NN-NN` range (a title-less leaf is named by its series and position) and weighs the folder title against conflicting multi-file tags. | Checks structured leaves and their direct disc folders once. It also checks revision 5 multi-file books whose folder gives a title different from the scanned one. Other current revision 5 snapshots get the new stamp alone. Earlier revisions keep their [scan checks](scanner.md#books-already-indexed). | A snapshot with no revision (any server before revision 1) was read when the lone folder above a book (`Charles Dickens/Great Expectations`) was its series @@ -2228,16 +2229,18 @@ write path calls `refreshEffective` inside its own transaction: - `EditBook` and `EditBooks` (the admin edits; the bulk form is all-or-nothing). -Two consequences: +Players, search, the `/fs` annotations, `/meta` lookups and the export read +edited values straight off the row. A rescan writes the newly scanned values +and re-applies the overrides in the same transaction. Readers therefore see +the edited value throughout the scan. -- **No read-time join.** Players, search, the `/fs` annotations, `/meta` - lookups and the export read edited values straight off the row. The player - wire format did not change. -- **An edit is a lock.** A rescan writes the newly scanned values and then - re-applies the overrides in the same transaction, so an edited field is never - visible with its scanned value, even for a moment. Reverting deletes the - override and re-layers from the stored `scanned` value. That needs no rescan - and no disk access. +Reverting an admin edit deletes the override and resolves the underlying +layers from the database. When an admin reverts a community title, the server +saves the underlying title as an `edited` override if it passes ordinary title +validation. A later metadata fill respects that choice, even if the admin +reverts after the fill planned its changes. Reverting that edit lets fills +change the title again. If the restored title fails validation, the server +removes the community override and stores no edit. Per field, `resolve` yields the effective value, its source, the scanned value, whether it is locked, and who last edited it. Sources are not stored. `resolve` @@ -2314,9 +2317,11 @@ path with `metadata.FromPathLayout`. That uses the folder LAYOUT from - The folder holding the book is the series when there is an author folder above it. - The leaf is the title, with its leading number split off as the position. - The exception is a leaf named `Author; Series; Book NN[; Title]`, which gives - its series, position or range, and title part (`metadata.LeafSeries`). -- Disc and track folders are parts. + A structured leaf such as `Author; Series; Book 02; Title` supplies its own + title, series and position. `Book 01-05` and `Books 01-05` both supply a + range. At the library root the leaf also supplies the author. +- Disc and track folders are parts. A disc folder indexed directly under a + structured leaf uses its parent's book details. The layout's title, author and series go over the scanned ones wherever the layout says anything. Where it says nothing, it still replaces a scanned value @@ -2328,13 +2333,17 @@ title always keeps a value. The position goes with the series. It is the layout's own position, or else the scanned one only while the series it numbers stays (the same series, compared ignoring letter case). A tag title that IS the leaf's name, number and all -(`13 Reasons Why`), is kept whole with no position read from it. The exception -is a `LeafSeries` leaf, whose parts the layout reads even when the title is the -whole leaf (an untagged book's). +(`13 Reasons Why`), is kept whole with no position read from it. The layout +parses a structured leaf even when the title tag repeats its whole name. -This is a resolve rule, not a scan rule, and `books.scanned` is the same in -either mode. So a change of source needs no rescan and no disk access. From -2.7.0 it is a resumable job: +Both source modes read an untagged structured leaf the same way: +`Bruno Miller; Dark Road; Books 01-05` has the scanned title "Dark Road 1-5" +from `DeriveFromPath`, with source `path`. How the leaf combines with tags is in +[A leaf that states its series](scanner.md#a-leaf-that-states-its-series). + +The catalog applies the library's source preference when it resolves the book. +Both modes use the same `books.scanned` snapshot. A resumable job updates the +books from the database when the preference changes. - `UpdateLibrary` marks the library due in the edit's transaction (`markResolve`, the `server_state` key `library_resolve_due`: each due diff --git a/docs-developers/server/scanner.md b/docs-developers/server/scanner.md index dced5ee8..4ac7bf26 100644 --- a/docs-developers/server/scanner.md +++ b/docs-developers/server/scanner.md @@ -482,15 +482,19 @@ given migration: already recorded that failure (`probe_failed`). Then it takes what the tags give. -If ffprobe rejects the primary file as invalid while filling in names or tag -hints, and the last index had no `probe_failed` problem, the scanner records -that index's `indexed_at` in `books.tag_read_failed_at`. Scans skip those two -checks, even after a restart, until a file change or **Read the files again** -re-indexes the book. A rejection is ffmpeg's invalid-data error, or a format -not on the server's list (`metadata.ErrProbeRejected`). Any other ffprobe -failure (a timeout, a read error, an ffprobe that fails to start) and a frame -count cut short for now (`uncountedForNow`) leave the checks pending for the -next scan. +Two failures cause the scanner to record the book's `indexed_at` in +`books.tag_read_failed_at`. + +- While filling in names or tag hints, ffprobe rejects the primary file + (`metadata.ErrProbeRejected`) and the last index had no `probe_failed` + problem. A rejection means invalid data or a format outside the server's list. +- While checking a multi-file title, the scanner needs the last file's tags but + cannot open that file. It keeps the stored title. + +Later scans skip the name and tag-hint checks, even after a restart, until a +file change or **Read the files again** re-indexes the book. A stopped read, +a timeout, other ffprobe errors and a frame count cut short (`uncountedForNow`) +leave the check pending for the next scan. #### Audiobookshelf `metadata.json` @@ -993,7 +997,8 @@ The ancestors give the series and author: - A book at the library root has no ancestors, so the old "flat" layout needs no special case. - One leaf name wins over the folders. `Author; Series; Book NN[; Title]` - states its own series and position (`metadata.LeafSeries`; see + states its own title, series and position, and a disc folder directly inside + it reads the same (see [A leaf that states its series](#a-leaf-that-states-its-series)). A lone ancestor used to be read as the series. The next scan puts right a @@ -1158,41 +1163,31 @@ unsure of goes without (see [With no ffprobe](#with-no-ffprobe)). ### A leaf that states its series -Some library tools name a book's folder and file `Author; Series; Book NN[; -Title]` (`Mark Tufo/Mark Tufo; Indian Hill; Book 04; From The Ashes`). -`DeriveFromPath` reads such a leaf with `metadata.LeafSeries` and takes its -series and position over the folder holding the book: - -- `Book 04` is position 4 (`Book 2.5` is 2.5); -- `Book 01-05` and `Book 10-12` are a range (`ParseSeriesRange`: the start as - `SeriesIndex`, the end as `SeriesIndexEnd`, an omnibus); -- `Book XX` (or `??`) and `Book 00` state the series and no position; -- the marker must be a number or that placeholder (`leafVolume`), so - `Oprah; Picks; Book Club` is no such leaf and states nothing. - -How the leaf combines with the tags: - -- In `DeriveFromPath` the leaf's title stays the whole name. `TitleNotSeries` - reads the title part (see - [An album that is only the series](#an-album-that-is-only-the-series)). -- As the path baseline, the leaf's series is used only when the tags give none - (`readNames`). Its position is kept when the tags give a series but no - position. -- In a tags-first library, an untagged leaf book keeps the whole leaf as its - title. -- A [path-first library](data-model.md#metadata-overrides-and-effective-values) - reads the leaf's parts too. Before, the whole leaf was the title. -- So does the console's - [`match_query`](api/reference.md#get-apiv1adminlibrariesidbook), where it - replaces a junk or swapped tag, or an untagged book's whole-leaf title - (`Dark Road 1-5 Bruno Miller` for a leaf with no title part). - -On the LibraForge benchmark's library of these leaves (about 600 books), the -reading raised auto-right matches by 39 and cut auto-wrong ones from 8 to 7. - -**Books already indexed** are put right by the next scan, with no re-index -(`@rev` 3, `metadata.PathLeafSeries`). See -[Books already indexed](#books-already-indexed) below. +`metadata.LeafSeries` reads the book's folder name or its filename without the +extension. For `Mark Tufo; Indian Hill; Book 02; Bastion`, `DeriveFromPath` +returns "Bastion", series "Indian Hill", position 2. An author folder supplies +the author when present. At the library root the first part gives "Mark Tufo". +A separately indexed `CD1` directly inside this folder gets the same names +and position, even if it contains only one file. + +| Marker in the leaf | Position | +|---|---| +| `Book 04` or `Book 2.5` | 4 or 2.5 | +| `Book 01-05` or `Books 01-05` | `ParseSeriesRange` gives `SeriesIndex` 1 and `SeriesIndexEnd` 5. | +| `Book XX`, `Book ??` or `Book 00` | The series has no position. | + +`Oprah; Picks; Book Club` has no recognized marker and follows the ordinary +path rules. When a structured leaf omits the title, `DeriveFromPath` uses +`SeriesTitle()`. An untagged `Bruno Miller; Dark Road; Books 01-05` therefore +has the title "Dark Road 1-5". If both the title and position are missing, the +series name alone supplies the title. + +`readNames` takes an explicit series and position from the tags. A series tag +without a position can inherit the leaf's number or range only for the same +series. `leafTagSeries` compares the names with `match.SameSeries` or +`match.NormalizeSeries`, so "Expanse" can take the position from "The Expanse". +A different tagged series drops both ends of the leaf's range. For the +folder-first reading, see [A library's metadata source](data-model.md#a-librarys-metadata-source). ### An album that is only the series @@ -1242,17 +1237,21 @@ For a book of several files, a title tag that is the album plus a track marker ("Indian Hill 03") is a file's name and doesn't count either. Then, in order: 1. If the two agree, that is the title. -2. The path's title wins for a book of several files (whose title tag is its - first file's) when no title tag counts, or when it sits beside a tag carrying - the series' name ("002 - Spellmonger - Book 002 - Warmage" beside - "Book 2 - Warmage"). -3. A book at position 1 (the tags' position, else the leaf's volume) keeps the +2. A usable path title wins if the book has several files, the title tag is + unusable, or the tag carries the series name. +3. When a leaf has no title part, states a range and names the album's series, + a usable title tag wins if it contains the series name or the book has one file. + Otherwise the leaf supplies the title, for example "Dark Road 1-5" even + with album "Dark Road". It comes before rule 4, so a range starting at 1 + takes it too. +4. A book at position 1 (the tags' position, else the leaf's volume) keeps the album. A series is often named for its first book, whose title tag may be a chapter's ("End Credits"). -4. The title tag wins, except for a book of several files. There, the lone +5. The title tag wins, except for a book of several files. There, the lone first-file tag ("Prologue" in `Indian Hill/Book 3`) counts only when it carries the series' name. -5. Otherwise the album stays. +6. A title-less leaf naming the album's series supplies its series and position + ("Indian Hill 5"). Otherwise the album stays. The result is the stored title, so the player, search and the match's query all see the book's own title. `metadata.PathTitle` is the path's title that @@ -1263,75 +1262,67 @@ leaf without a title part. The console's provenance labels it `path` (see ### A book of several files' title -`bookTitle` prefers a title tag that extends the album with a tail that isn't a -track marker. For a book of several files that tag is its first file's, and the -tail often names that file: "Frankenstein; or, The Modern Prometheus - Letters -1-4", "The Odyssey: Book 01". So for a book of more than one file, `readNames` -takes `metadata.PartsTitle` instead of the first file's title. - -`Metadata.PartNamed` decides whether the title is in question. It holds when -`bookTitle` took the title tag over an album it extends, and neither the whole -tag nor what it adds to the album names the book's folder (`PathTitle`). A box -set's "The Expanse Box Set: Leviathan Wakes" in the folder `Leviathan Wakes` is -not in question and keeps the tag. Where `PartNamed` holds, `PartsTitle` reads -the book's last file's tags too, and the title is, in order: - -1. the tag, when the last file has the same title tag in any case (the series as - the album and "Harry Potter and the Philosopher's Stone" on every file, in a - folder `HP1`); -2. the name the two tags share past the album (`partsName`), unless the folder - names the album. Each tag must lead with the album and a separator (a colon, - or a spaced dash or bar). The names after it are compared one by one from the - start, and the ones the tags share up to the first that differs make the name: - "The Great Hunt" of "The Wheel of Time: The Great Hunt - The Wheel" and - "... - The Dragon". A shared name that is only a - track or volume marker ("Part 1", "Book 1") counts as none; -3. the tag without its bracketed groups, when the two tags differ only in those - ("Harry Potter and the Philosopher's Stone (Part 1)" and "(Part 2)"); -4. otherwise the album. - -With the last file unread, the album stands. `TitleNotSeries` then applies as for -any album (see -[An album that is only the series](#an-album-that-is-only-the-series)). A book of -one file keeps the title tag ("Portal to Nova Roma: Paris"). - -The scanner reads the last file's tags only when the title depends on them (the -scanner's `partNamed`). A full index has them already, from the book's own read -for its chapters (`buildMultiFileChapters`), and names the book again with them. -The backfill and the setup preview read that one file more. A backfill that -can't read it leaves the names for the next scan rather than storing the album -on a guess. An admin's title edit still wins over the scanned title. +For a book with several files, `readNames` calls `metadata.PartsTitle` with +the first file's tags and the folder's `PathTitle`. `Metadata.PartNamed` +decides whether the last file's tags could change the result. A full index +reuses those tags from the chapter read. The setup preview and name backfill +open the last file only when needed. + +- **Without an album**, a meaningful title tag shared by the first and last + files wins. "Dune (Part 1)" and "Dune (Part 2)" give "Dune". Different + chapter names give the folder title, as in `Fahrenheit 451`. A folder that + names no title, such as `03`, leaves the first usable title tag in place. +- **When a title tag adds a subtitle to the album**, the tag wins if it or its + suffix names the book folder, or if both files have the same tag. Otherwise + `partsName` looks for a shared book name after the album, unless the folder + names the album itself. "The Wheel of Time: The Great Hunt - The Wheel" and + "The Wheel of Time: The Great Hunt - The Dragon" give "The Great Hunt". + A shared part or volume marker alone contributes no book name. Tags that + differ only in bracketed notes can still give their common title. +- **When the album may name a series**, the first file must have no series + tag, and the album and folder must share no distinctive word + (`match.TitlesShareWord` ignores case and accents, and the scanner removes + bracketed notes). If the first title tag names the book folder, its spelling + wins immediately. If the two files name different chapters and the last + file's album is absent or agrees with the first, the folder supplies the + title. In `The Dragon Reborn`, named chapters with album "The Wheel of Time" + give "The Dragon Reborn". The same rule covers chapter names prefixed with + the series. + +Track labels, filenames and tags that number the same name in turn give no +evidence for replacing the album with the folder. The album also stays when +the folder names a volume (`03`, `Book One`, `Mistborn Book One`), its contents +(`Files`, `MP3`), a code (`HP1`, an ASIN or an ISBN), or the tagged author. +Files directly in `Andy Weir` with that author tag keep the album "The Martian". +A book directly in its *series* folder can take that folder's name when the +files name different chapters and have no series tag. + +If the resulting title is an album that names a known series, `TitleNotSeries` +can still use the book's own title. An admin's title edit takes precedence over +the scan. See [An album that is only the series](#an-album-that-is-only-the-series). ### Books already indexed -Books already indexed are put right without a re-index or a migration. Each -rule raised the snapshot's `@rev` (see -[Data model](data-model.md#the-rebuildable-index)): +The first library scan after updating checks the names of affected books once. +It updates their stored snapshots without re-indexing the books or running a +migration. The snapshot's `@rev` records which rules it used. See +[Data model](data-model.md#the-rebuildable-index). -| `@rev` | Rule | -|---|---| -| 1 to 2 | [an album that is only the series](#an-album-that-is-only-the-series) | -| 2 to 3 | [a leaf that states its series](#a-leaf-that-states-its-series) | -| 3 to 4 | the tag reading of 2.4.0 and 2.5.0: a series tag carrying its position (`metadata.SplitSeriesTag`), a title in any script not generic (`IsGenericTitle`), and the MP4 `\xa9nrt` narrator item and a narrator tag over composer | -| 4 to 5 | [a book of several files' title](#a-book-of-several-files-title) (`metadata.PartsTitle`) | - -The snapshot carries the narrator too, so a backfill rewrites it. +**Flagged books.** `Catalog.Signatures` sets `Signature.NamesCheck` when any +of these conditions applies. -**Flagged books.** `Catalog.Signatures` sets `Signature.NamesCheck` on: - -- a snapshot of revision 1 or none whose stored title and series could be such - a reading (`metadata.MaybeSeriesTitle`, about 2 µs a row); -- a snapshot older than revision 3 whose leaf `metadata.PathLeafSeries` reads; -- a snapshot older than revision 4 whose tag reading may differ - (`tagReadingMayDiffer`): an MP4-family book, a narrator, a series that - `SplitSeriesTag` splits, or a non-ASCII letter in the title or path; -- a snapshot older than revision 5 of a folder book with more than one file in - `book_files` (counted in `Signatures` only for such an older snapshot). +| Snapshot revision | Which books need a name check | +|---|---| +| Before 2 | `metadata.MaybeSeriesTitle` flags [a scanned title that may be its series](#an-album-that-is-only-the-series). | +| Before 4 | `tagReadingMayDiffer` flags an MP4-family book, a narrator, a series that `SplitSeriesTag` splits, or a non-ASCII letter in the title or path. | +| Before 5 | The folder book has more than one file in `book_files`. Its first file may have supplied a [chapter title](#a-book-of-several-files-title). | +| Before 6 | `metadata.PathLeafSeries` recognizes [a structured leaf](#a-leaf-that-states-its-series) in the book's own path component or directly above its disc folder. | +| 5 | A multi-file book has a nonempty `metadata.PathTitle` that differs from its scanned title under `metadata.SameName`. Case or bracketed edition notes alone do not trigger a read. | The next scan reads a flagged book's first file once, with the same read as the path backfill, and its last file too where the title depends on it (`partNamed`). -`Catalog.SetPathReading` then rewrites its snapshot, and skips only a snapshot -already at the current revision. +`Catalog.SetPathReading` then rewrites the names, including the narrator, +unless the snapshot is already at the current revision. - A book that the snapshot alone could settle for the lone-folder check waits for this read too. So an unreadable file never records today's revision with @@ -1339,9 +1330,12 @@ already at the current revision. - These reads run `readSlots` wide, in batches (`tagRead`, `tagReadsPerSlot`). A large revision-4 backfill (every narrated book, once) therefore costs one parallel tag read each. -- A read that a Stop cuts short is left for the next scan. +- If the required last file cannot open, the scanner keeps the stored title + and remembers the failure until the book is indexed again. A stopped or + timed-out read waits for the next scan. See + [Backfills for a skipped book](#backfills-for-a-skipped-book). -**Books not flagged.** That scan stamps a current revision 1 to 4 snapshot +**Books not flagged.** That scan stamps a current revision 1 to 5 snapshot (`Signature.RevStamp`) at today's revision (`Catalog.StampScannedRev` with `revOlderOwn`, a compare-and-set that changes only the revision). Later scans don't test it again. A snapshot of no revision that isn't flagged is not @@ -1525,7 +1519,7 @@ book. A book kept for a part that reads the same every time alone were written (`recordLengths`) record revision 2 as they are (`stampDurationRev`), because reading them again would only keep them again. -The same scan reads each +The same scan [checks affected book names](#books-already-indexed) and reads each [Audiobookshelf metadata.json](#audiobookshelf-metadatajson) once more, for the reader's [name joining](data-model.md#the-audiobookshelf-layer). After these reads succeed, a second scan of the unchanged library skips both the diff --git a/docs-developers/server/web-ui.md b/docs-developers/server/web-ui.md index b11450e7..5d4d2823 100644 --- a/docs-developers/server/web-ui.md +++ b/docs-developers/server/web-ui.md @@ -685,11 +685,12 @@ the list and position the book had. The match dialog calls `GET …/book/match`, which matches the book's tag and path facts through metaserve's `works/match`. -- **Search box.** It opens with the book page's `match_query`, so the console - never works the query out itself. The server builds it with - `meta.SearchPrefill`: the title and author, or the folders' reading of the - path when the tags look swapped or junk, or when the title is a whole - `Author; Series; Book NN` leaf. +- **Search box.** It opens with the book page's + [`match_query`](api/reference.md#get-apiv1adminlibrariesidbook), so the + console never works the query out itself. The server builds it with + `meta.SearchPrefill` (for `Bruno Miller; Dark Road; Books 01-05`, "Dark Road + 1-5 Bruno Miller"). The first match uses the book's tags and path, not this + text. - **Starting pick.** The dialog starts from the book's `community_match` when the search lists it. - **Accepting.** The ticked fields, ASIN and ISBN included, are accepted as one diff --git a/docs-users/admin/books.md b/docs-users/admin/books.md index f08087b0..459eb407 100644 --- a/docs-users/admin/books.md +++ b/docs-users/admin/books.md @@ -59,9 +59,11 @@ If the book is already matched to a community book, the dialog opens with that match selected and in view. If the search didn't find it, the dialog adds it at the end, marked **Current match** instead of a percentage. -Accepted values are marked **Community** and are kept like your own edits. You -can revert them the same way. Save or discard any unsaved edits on the page -before you match. +Accepted values are marked **Community**. Choose **Revert** beside a community +title to restore the book's title from your library. It now shows **Edited**, +and later metadata fills keep it. To let fills change it again, choose +**Revert** beside the **Edited** title. Save or discard any unsaved edits before +you match. To match many books at once, use **Match automatically** on the Health page (see [Matching every book at once](health.md#matching-every-book-at-once)). @@ -207,8 +209,8 @@ community value has a **Revert** button that puts back what the files say. A book that holds several books of a series takes a range as its **Series number**, such as `1-3`. In **Other series**, write it as `Box Sets #2-4`. The [Series](#series) page then counts the omnibus as books 1 to 3, and in an -up-to-date app the next book after it is book 4. A range in a file or folder -name isn't read, so type it in here. +up-to-date app the next book after it is book 4. AudioSilo can also read the +range from a [file or folder named like `Author; Series; Books 01-03`](../getting-started/organizing-your-library.md#names-like-author-series-book-04-title). ### Covers diff --git a/docs-users/admin/health.md b/docs-users/admin/health.md index aebd3f9d..c6afd66a 100644 --- a/docs-users/admin/health.md +++ b/docs-users/admin/health.md @@ -260,9 +260,14 @@ your store's ASIN. **Fill in matched books** offers the community database's latest details for books that are already matched. Use it for books that got an ASIN without their details, -or to clean up series an earlier match added. It never brings back an ASIN or -ISBN you left unticked or later reverted. For a book matched before version -2.7.0, [match it](books.md#matching-with-community-metadata) to the same book +or to clean up series an earlier match added. + +A fill keeps a title you reverted on the book's page, and can still fill its +other fields (see [Matching with community metadata](books.md#matching-with-community-metadata)). + +A fill never brings back an ASIN or ISBN you left unticked or later reverted. +For a book matched before version 2.7.0, +[match it](books.md#matching-with-community-metadata) to the same book and edition again with nothing ticked, so the server knows which ones you left out. diff --git a/docs-users/admin/libraries.md b/docs-users/admin/libraries.md index e3bb49f1..2cdcdda6 100644 --- a/docs-users/admin/libraries.md +++ b/docs-users/admin/libraries.md @@ -153,15 +153,13 @@ but your files stay where they are. take their title, author, series and series number from: - **The files' tags first**: the default. Folder names fill in whatever the - tags leave empty (see - [Where titles, authors and series come from](../getting-started/organizing-your-library.md#where-titles-authors-and-series-come-from)). + tags leave empty. For a book of several files the folder can also give the + title (see [A book made of several files](../getting-started/organizing-your-library.md#a-book-made-of-several-files)). - **Folder names first**: for a library whose folders are named well but whose - tags aren't. Names like - [`Author; Series; Book 04; Title`](../getting-started/organizing-your-library.md#names-like-author-series-book-04-title) - are read by their parts. + tags aren't. The files' tags fill in whatever the folders leave empty. -Whichever comes second fills in what the first leaves empty. An Audiobookshelf -`metadata.json` in a book's folder wins over both. +Both settings read [names like `Author; Series; Book 04; Title`](../getting-started/organizing-your-library.md#names-like-author-series-book-04-title). +An Audiobookshelf `metadata.json` in a book's folder wins over both. Changing this updates the books without a rescan. A large library finishes in the background, so for a while some books can still show the old details. Your diff --git a/docs-users/getting-started/first-run.md b/docs-users/getting-started/first-run.md index 45bafe83..29708194 100644 --- a/docs-users/getting-started/first-run.md +++ b/docs-users/getting-started/first-run.md @@ -121,7 +121,7 @@ Titles, authors, narrators and series can come from the files' **tags** or from - **The files' tags first** suits well-tagged files, like most bought audiobooks. - **Folder names first** suits folders named like `Author / Series / 01 - Title`. -Either way, the other fills in what the first leaves empty. Changing this later re-reads the whole library, so it's worth a look now. See [Organize your audiobook files](./organizing-your-library.md#where-titles-authors-and-series-come-from). +Either way, the other fills in what the first leaves empty, and both read names such as `Author; Series; Book 02; Title`. You can change this setting later in the library. See [Organize your audiobook files](./organizing-your-library.md#where-titles-authors-and-series-come-from). ### Step 4: Community metadata diff --git a/docs-users/getting-started/organizing-your-library.md b/docs-users/getting-started/organizing-your-library.md index 1f9564b0..de18b6db 100644 --- a/docs-users/getting-started/organizing-your-library.md +++ b/docs-users/getting-started/organizing-your-library.md @@ -74,31 +74,35 @@ AudioSilo takes each book's details from these sources: - **The audio itself**: durations and any chapters in the file. - **The community database**, for chapters only: a book with no chapters of its own gets them once it is [matched](../admin/books.md#community-chapters). -By default tags win over folder names. If your folders are named well and your tags aren't, set the library to [folder names first](../admin/libraries.md#where-book-details-come-from). You can fix anything still wrong in the admin console without touching the files. See [Fix book details](../admin/books.md). +By default tags win, and folder names fill in what the tags leave empty. You can [use folder names first](../admin/libraries.md#where-book-details-come-from) or [edit a book's details](../admin/books.md). ### Names like `Author; Series; Book 04; Title` -Some tools name each book `Author; Series; Book NN; Title`, for example `Mark Tufo; Indian Hill; Book 04; From The Ashes`. AudioSilo reads the series and number from such a name, wherever the folder sits. The title part is optional. +A file or folder named `Mark Tufo; Indian Hill; Book 02; Bastion` gives "Bastion", book 2 of Indian Hill. +At the library root it also gives the author, Mark Tufo. Disc folders such as `CD1` directly inside it use those details. -- `Book 04` is number 4, and `Book 2.5` is 2.5. -- `Book 01-05` is a box set of books 1 to 5. -- `Book XX` and `Book 00` put the book in the series with no number. +- `Book 2.5` sorts between books 2 and 3. `Book XX` and `Book 00` leave the number blank. +- `Book 01-05` and `Books 01-05` both cover books 1 to 5. With no title at the end, `Bruno Miller; Dark Road; Books 01-05` gives "Dark Road 1-5". That also works with the album "Dark Road" if the files give no other book title. -With tags first, a series tag in the files still wins. With folder names first, the name wins. +With tags first, a number in the tags wins. A series tag without a number takes the name's number only for the same series. "Expanse" and "The Expanse" count as a match here. ### When the album tag is the series -Many tools put the series name in the album tag, so every book in a series has the same album. AudioSilo spots this and takes the book's own title from its title tag, file name or folder name instead. A book named after its series, like `Dune`, keeps the album as its title. +When the album names a known series, AudioSilo looks for the book's title in its title tag, filename or folder. A book named after its series, like `Dune`, keeps the album title. ### A book made of several files -In a book split into several files, each file often has its own title tag. When that tag starts with the album and adds more, the extra part usually names the file, not the book. For example, with the album "Frankenstein", the first file may be titled "Frankenstein - Letters 1-4". So for a book of several files, AudioSilo takes the album as the title, except in these cases: +With tags first, the album usually names the book. When files name different chapters, the folder can supply the title if the album is missing, or if it shares no word with the folder's name and the files have no series tag. For example, chapter files in `The Dragon Reborn` can share the album "The Wheel of Time" and still display as "The Dragon Reborn". -- **The tag is the book's.** The first and last files have the same title tag, or the tag names the book's folder. A title tag "The Expanse Box Set: Leviathan Wakes" in a folder `Leviathan Wakes` stays the title. -- **The files share a book name after the album.** "The Wheel of Time: The Great Hunt - Chapter 1" through "The Wheel of Time: The Great Hunt - Chapter 40" give "The Great Hunt", unless the book's folder has the album's name. A part or volume marker such as "Part 1" or "Book 1" is not a book name, so then the album stays. -- **The tags differ only in a bracketed part.** With the album "Harry Potter", the tags "Harry Potter and the Philosopher's Stone (Part 1)" and "... (Part 2)" give "Harry Potter and the Philosopher's Stone". +AudioSilo also checks whether the title tags name the book. -A book of one file keeps its title tag. A title you edited in the admin console stays as you set it. +- With no album, a shared title tag wins. "Dune (Part 1)" and "Dune (Part 2)" give "Dune". +- Files in `Leviathan Wakes` with the album "The Expanse Box Set" and the title tag "The Expanse Box Set: Leviathan Wakes" keep that full title, because the folder matches what the tag adds to the album. +- In `Book 2`, files with the album "The Wheel of Time" and title tags like "The Wheel of Time: The Great Hunt - Chapter 1" and "The Wheel of Time: The Great Hunt - Chapter 40" give "The Great Hunt". + +When the files have an album, folders named `03`, `Book One`, `Mistborn Book One`, `Files`, `MP3`, `HP1`, an ASIN or an ISBN keep it as the title. So does an author folder: files with the album "The Martian" by Andy Weir, directly in `Andy Weir`, keep that album. Without an album, files that name different chapters in a folder like `Mistborn Book One` or `Andy Weir` take the folder's name. + +If AudioSilo cannot open the last file it needs for this check, the book keeps its current title until its files change or you choose [**Read the files again**](../admin/books.md#a-books-page). A title you edited always stays. ## Audiobookshelf's metadata.json files {/* #coming-from-audiobookshelf */}