From c57a95714a2f333c7994becc6a57c8ab77e5d1a4 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Sun, 22 Nov 2026 18:10:35 +0000 Subject: [PATCH 1/6] Document atomic spelling merges and their Undo A merge of author, narrator or series spellings changes every matching book or none, up to 5,000 books, and Undo puts them back in one request, naming books edited since or moved by a scan. The API reference gains the merge and undo endpoints; the console, scanner and audit pages follow. --- docs-developers/server/api/reference.md | 111 ++++++++++++++++-- .../server/backups-and-notifications.md | 6 + docs-developers/server/scanner.md | 2 +- docs-developers/server/web-ui.md | 15 ++- docs-users/admin/books.md | 23 +++- docs-users/admin/health.md | 23 ++-- docs-users/admin/server.md | 5 + scripts/server-names.json | 4 +- 8 files changed, 159 insertions(+), 30 deletions(-) diff --git a/docs-developers/server/api/reference.md b/docs-developers/server/api/reference.md index b2c975a4..ed323d6c 100644 --- a/docs-developers/server/api/reference.md +++ b/docs-developers/server/api/reference.md @@ -7261,9 +7261,8 @@ unparseable filter, as for the list. ### `POST /api/v1/admin/books/bulk` -Applies the same field edit to many books in one transaction: **every book is -edited or none is**. Merging two spellings of an author is a bulk `set` of -`author` over their books. +Applies the same field edit to the books named in the request. The server +edits every selected book in one transaction or changes none. Select up to 1,000 books. Each path is at most 4,096 bytes. The edit itself can use up to 1 MiB. The whole body can use 5,274,112 bytes. An oversized list, edit or request returns 400 @@ -7336,6 +7335,100 @@ new main series. One book whose old main series can't be listed refuses the whol request: `400` `code: "invalid_override"` with `field: "series"`, its `error` ending with that book's path in parentheses. +### `POST /api/v1/admin/books/merge` + +*Admin only.* Replaces source spellings with a target spelling. In one +transaction, the server selects the matching books, reads their prior +overrides for the response and sets the field to the target as an `edited` override. +If any edit fails, the whole merge rolls back. + +| Body field | Meaning | +|---|---| +| `field` | Required. One of `author`, `narrator` or `series`. | +| `sources` | Required. An array of 1 to 1,000 nonblank spellings. Each must exactly match the whole effective credit or main series name to select a book. For `series`, all sources must have the same series key as the target. | +| `target` | Required. The spelling to keep. The server trims it and requires a nonblank value of at most 500 characters with no control characters. | +| `library_id` | Optional integer. A positive ID selects one book library. Zero or omission selects all book libraries. | + +For example, a source of `Weir, Andy` matches that author credit in full. A +longer co-credit containing that name keeps its spelling. Books that already +use the target are excluded. + +```json +{ + "field": "author", + "sources": ["Weir, Andy", "A. Weir"], + "target": "Andy Weir", + "library_id": 1 +} +``` + +The `200` response contains only the books that changed, or `{"books":[]}` +if none matched. Keep this list for Undo. Each `previous` is the field's prior +override value, or `null` if it had none. A prior override includes its +`source` (`edited` or `community`). + +```json +{ + "books": [ + { "library_id": 1, "path": "Andy Weir/Artemis", "previous": null }, + { "library_id": 1, "path": "Andy Weir/The Martian", "previous": "A. Weir", "source": "community" } + ] +} +``` + +| Status | When it applies | +|---|---| +| `400` | `too_large` if more than 5,000 books would change, more than 1,000 sources are supplied or the body exceeds 1 MiB. The server writes nothing. | +| `400` | Malformed JSON or an unknown key returns `invalid request`. A field validation failure, including a negative `library_id` or unrelated series names, returns `invalid_override` with the offending `field`. | +| `401` / `403` | Authentication is required. A signed-in non-admin gets `403`. | +| `404` | The supplied library ID is unknown. The response is `{"error":"library not found"}`. | +| `409` | `not_book_library` if the ID belongs to a podcast library. | + +### `POST /api/v1/admin/books/merge/undo` + +*Admin only.* Send the original `field` and `target` with the `books` array +from the merge response. Each book's `library_id` and `path` set the scope. +The server counts a repeated path in the same library once. + +```json +{ + "field": "author", + "target": "Andy Weir", + "books": [ + { "library_id": 1, "path": "Andy Weir/Artemis", "previous": null }, + { "library_id": 1, "path": "Andy Weir/The Martian", "previous": "A. Weir", "source": "community" } + ] +} +``` + +If the current override still equals the target, Undo restores the prior +value with its original source. For `previous: null`, it removes the override +so the field follows its underlying metadata again. Undo restores eligible +books in one transaction. A write failure rolls back every restoration. + +The `200` response counts restored books and lists every skip by library, +path and reason. The list is empty when all books were restored. + +```json +{ + "restored": 1, + "skipped": [ + { "library_id": 1, "path": "Andy Weir/Artemis", "reason": "changed" } + ] +} +``` + +- `changed` means the field's override now differs from the target or someone + has removed it. Undo preserves the current value. +- `not_found` means no book is indexed at that library and path, for example + after a scan found that the book had moved. Other eligible books still go back. + +Undo returns `400` with `too_large` for more than 5,000 entries in `books` +or a body over 36,185,536 bytes. Malformed JSON or an unknown key returns `400` with +`invalid request`. An empty list or invalid field, target or prior override +returns `400` with `invalid_override`. The same `401` and `403` rules apply +as for the merge. + ### `GET /api/v1/admin/authors` · `GET /api/v1/admin/narrators` The distinct authors (or narrators) with their book counts and total duration, @@ -7379,9 +7472,8 @@ The narrators route uses the key `narrators` instead of `authors`. kept, so names in non-Latin scripts get suggestions too and two different ones never group by accident. `suggested` is the spelling with the most books (ties: the `Given Surname` form over `Surname, Given`, then - alphabetical); `books` is the group's total. The - server never merges on its own; applying a suggestion is a - [bulk edit](#post-apiv1adminbooksbulk). + alphabetical). To apply a suggestion, send the other `names` as `sources` + and `suggested` as the `target` to the [merge endpoint](#post-apiv1adminbooksmerge). ### `GET /api/v1/admin/series` @@ -9060,9 +9152,10 @@ library, from the same rule as the `series_spellings` count. - A series can be in both views while some of its books are ignored and some not. At most 200 entries, ordered by `suggested` (case-insensitive), then library. -The console's fix is a [bulk edit](#post-apiv1adminbooksbulk) setting `series` on -the books of the other spellings, as an author merge is; ignoring a series is a -`series_spellings` ignore of every one of its books. +The console sends the group's `library_id`, the chosen target and the other +spellings to the [merge endpoint](#post-apiv1adminbooksmerge) with `field` +set to `series`. Ignoring a series applies a `series_spellings` ignore to +every one of its books. ### `POST /api/v1/admin/issues/ignore` · `DELETE /api/v1/admin/issues/ignore` diff --git a/docs-developers/server/backups-and-notifications.md b/docs-developers/server/backups-and-notifications.md index 0dae56f9..bce37cb9 100644 --- a/docs-developers/server/backups-and-notifications.md +++ b/docs-developers/server/backups-and-notifications.md @@ -295,6 +295,12 @@ Notes on the longer rows: is the member's username. `DELETE /me/devices/{id}?also_members=1` also records one `device_revoke` per member it signs out, with the owner's device id. +- **`book.bulk_edit`.** A spelling merge that changes books adds one **Edited + several books** entry. Its details include the target in `set`, the changed + count in `books` and the first 20 source spellings in `merged` (**Merged + spellings**), each limited to 120 characters. A merge scoped to one library + also records its name in `library`. An Undo that restores books adds one + entry with the field in `revert` and the restored count in `books`. - **`settings.support`.** An answer to the console's [support card](web-ui.md#the-support-card). Details: `choice` (`donated` or `snoozed`) and, for a snooze, `returns_at`. It is not recorded when a donation diff --git a/docs-developers/server/scanner.md b/docs-developers/server/scanner.md index 8b8b15a3..dced5ee8 100644 --- a/docs-developers/server/scanner.md +++ b/docs-developers/server/scanner.md @@ -2111,7 +2111,7 @@ predicate over `books b`, shared by the counts (`IssueCounts`) and the lists | `no_cover` | a scan has checked it (`has_cover` not `NULL`), and it has no sidecar image, no embedded art and no custom cover | | `unmatched` | it has no ASIN, no ISBN and no recorded community match (`book_matches`, see [Data model](data-model.md#durable-per-library-config-path-keyed-no-fk-to-books); `NOT catalog.matchedExpr`). [Tag hints](data-model.md#tag-hints) and an import's [match hints](data-model.md#match-hints-from-an-import) don't count. Offered only while community metadata is on | | `unknown_asin` | its own ASIN is one the [unknown-ASIN report](configuration.md#the-unknown-asin-report-metadatareport_unknown) found the community database doesn't know (an `unknown_asin_reports` row with `unknown = 1`, matched on the upper-cased, trimmed ASIN; `unknownASINExpr`), and it has no ISBN, no `book_matches` row and no ASIN a community match gave it (`book_overrides` of source `community`), so matching it by hand settles it. It still counts as matched (`matchedExpr`), so Match automatically skips it; from 2.7.0 the kind's own card starts an [`unknown_asin` match run](api/reference.md#post-apiv1adminmatch-runs) for it, which finds each book by its title. The summary lists the kind only while the report is on, since only its lookups fill the table | -| `series_spellings` | another book of its library spells its main series another way: the same `series_key`, a different `series`. This takes two range seeks on `idx_books_series_key`, for a spelling below its own or above. `SeriesSpellingGroups` lists them per series from the same predicate, and the console's fix sets one spelling with a bulk edit | +| `series_spellings` | Another book in the library has the same main `series_key` with a different `series` spelling. Two range seeks on `idx_books_series_key` look for a spelling below or above the book's own. `SeriesSpellingGroups` uses the same rule to group books by series. The console applies the chosen spelling with the [merge endpoint](api/reference.md#post-apiv1adminbooksmerge). | | `no_chapters` | it is longer than **2 hours** and has at most one chapter. The console shows why community chapters weren't used from the row's `chapters_check` (a failed [community chapter check](community-chapters.md)) | | `detailed_chapters` | its last community chapter check is `refine` (the community's finer chapters fit), it has no `chapter_source` choice and no edited chapter list. Picking either source, or editing the chapters, settles it | | `transcode` | its codec doesn't play in browsers (`media.DirectPlayable`) | diff --git a/docs-developers/server/web-ui.md b/docs-developers/server/web-ui.md index f21e3bad..51c5d9f1 100644 --- a/docs-developers/server/web-ui.md +++ b/docs-developers/server/web-ui.md @@ -597,8 +597,13 @@ The Overview is built on `GET /admin/stats`, `GET /admin/sessions/live`, #### Library > Authors, Narrators and Series These screens run on `GET /admin/authors`, `/admin/narrators` and -`/admin/series`. Narrators' merge suggestions are applied as a bulk edit, with -Undo. +`/admin/series`. For an author or narrator suggestion, `useMerge` sends one +[`POST /admin/books/merge`](api/reference.md#post-apiv1adminbooksmerge) with +the spellings and the selected library, if any. The confirmation's **Undo** +sends the returned books with the original field and target in one +[`POST /admin/books/merge/undo`](api/reference.md#post-apiv1adminbooksmergeundo). +If Undo skips books, the console shows up to three paths and counts the rest. +If the Undo request fails, the console offers **Undo** again. **Series gaps.** A series card shows community series gaps, hidden when metadata is off: @@ -1169,9 +1174,9 @@ Series spelled several ways (`series-spellings.tsx`) are grouped too, with one notice per series and library from `GET /admin/issues/series-spellings`: - The suggested spelling is picked first in a select. -- "Use this spelling" runs the Authors page's merge (`useMerge` on `series`). - That is a bulk `series` edit of the books whose main series is that series, - with Undo. +- **Use this spelling** calls `useMerge` with `series` and the group's library + ID. One merge request changes the matching main series names. **Undo** sends + the books from that response back in one request. - Ignore and Show again cover every one of the series' books. ##### Match automatically diff --git a/docs-users/admin/books.md b/docs-users/admin/books.md index 84fcf6e0..c0d726ee 100644 --- a/docs-users/admin/books.md +++ b/docs-users/admin/books.md @@ -385,10 +385,20 @@ book credited to two people counts for each of them. ### Merging two spellings -When two names look alike, a suggestion appears above the list, for example -"“Sanderson, Brandon” looks like Brandon Sanderson". Click **Merge authors** (or -**Merge narrators**) to set one spelling on every book, as an edit. The -confirmation has an **Undo** button. +When two names look alike, click **Merge authors** or **Merge narrators** above +the list to use the suggested spelling. The merge covers the selected library, +or all book libraries if you haven't picked one. + +The whole credit must match. For example, merging “Sanderson, Brandon” into +“Brandon Sanderson” leaves “Sanderson, Brandon & Janci Patterson” as written. +AudioSilo saves the edit on every matching book at once. If any edit fails or +more than 5,000 books would change, it changes none. + +Choose **Undo** in the confirmation to put back any earlier edit or community +value. A credit that came from the book's tags follows its tags again. If +someone has since changed or reverted that credit, or a scan found the book +had moved, Undo skips that book and restores the others. The message lists up +to three skipped paths and counts any others. ## Series @@ -399,9 +409,10 @@ author** to narrow the list. ![Library > Series](/img/screenshots/admin/series.png) Spellings that differ only in capitals, accents, punctuation or spaces count as -one series. Other differences ("The Expanse" and "Expanse") make two series. -Fix those with a [bulk edit](#changing-many-books-at-once), or use +one series. To use one spelling throughout a library, open [Series spelled several ways](health.md#series-spelled-several-ways) in Health. +Names such as "The Expanse" and "Expanse" count as two series. To give their +books the same series name, use a [bulk edit](#changing-many-books-at-once). With community metadata on, a series with a matched book also shows the books you don't have, as dashed gaps: "You have 1, 2, 4 of 5; missing 3, 5". A gap diff --git a/docs-users/admin/health.md b/docs-users/admin/health.md index 099afcf8..cb699ff2 100644 --- a/docs-users/admin/health.md +++ b/docs-users/admin/health.md @@ -106,14 +106,21 @@ delete its files from the library folder and rescan. ### Series spelled several ways -AudioSilo already shows spellings that differ only in capitals, accents or -punctuation as one series. But the books still say it differently in the -players' details. This list fixes that. - -- **Use this spelling** sets one spelling on every book of the series, as an - edit. Pick another spelling from the list beside it if you prefer. The - message has an **Undo** button. -- **Ignore** stops suggesting that series. +Pick the series spelling you want listeners to see, then click **Use this +spelling**. AudioSilo offers this choice when books in one library spell their +main series differently in capitals, accents, punctuation or spacing. +**Ignore** hides the suggestion for that series. + +AudioSilo changes every matching main series name at once and keeps each +book's position in the series. If any edit fails or more than 5,000 books +would change, it changes none. The merge skips books that list the series +only as an additional series. + +Choose **Undo** in the confirmation to restore any earlier series edit or +community value. A series name that came from the book's tags follows its tags +again. Undo skips books whose series name someone has since changed or +reverted, and books a scan can no longer find at their old path. It restores +the others and shows up to three skipped paths, with a count of any more. ### When a library is offline diff --git a/docs-users/admin/server.md b/docs-users/admin/server.md index d2448d6f..8cb3f324 100644 --- a/docs-users/admin/server.md +++ b/docs-users/admin/server.md @@ -379,5 +379,10 @@ books, settings, backups and notifications. An Audible backup action names the account it was for. Sign-ins and listening are in [Activity](activity.md), and scans in [Health > Jobs](health.md#jobs). +After a spelling merge, look for **Edited several books**. **Merged spellings** +lists the old spellings, and the entry shows the spelling you chose, how many +books changed and the library if you picked one. When **Undo** restores books, +a second entry shows the field under **Reverted** and how many books it restored. + The log never holds a password or other secret, and no IP addresses. Entries are kept for a year. diff --git a/scripts/server-names.json b/scripts/server-names.json index e13bc971..5b4e088b 100644 --- a/scripts/server-names.json +++ b/scripts/server-names.json @@ -1,6 +1,6 @@ { "repo": "KodeStar/audiosilo-server", - "ref": "d91029684a73476096a7c8691effbdfd57db28c8", + "ref": "2419ff713de3530041d894879c09f1967a01f49b", "capabilities": [ "addresses", "admin_ui", @@ -74,6 +74,8 @@ "/api/v1/admin/books", "/api/v1/admin/books/bulk", "/api/v1/admin/books/facets", + "/api/v1/admin/books/merge", + "/api/v1/admin/books/merge/undo", "/api/v1/admin/books/works", "/api/v1/admin/bridge", "/api/v1/admin/bridge/estimate", From 35b92c17fae42e48f400cc0bd5e3c4f25db676c6 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Sun, 22 Nov 2026 18:13:33 +0000 Subject: [PATCH 2/6] Say the merge's Undo rules once and link them from Health Health's series spellings section repeated the author merge's limit and Undo paragraph word for word; it now keeps the series-only rules and links to Merging two spellings. The merge routes use the reference's usual 401/403 row and name their audit entries, the book.bulk_edit note covers a plain bulk edit too, and the Authors section points unsuggested pairs at a bulk edit again. Part of the v2.7.0 burn-down (atomic spelling merges). --- docs-developers/server/api/reference.md | 24 +++++++++-------- .../server/backups-and-notifications.md | 9 ++++--- docs-developers/server/web-ui.md | 4 +-- docs-users/admin/books.md | 26 ++++++++++--------- docs-users/admin/health.md | 14 +++------- docs-users/admin/server.md | 8 +++--- 6 files changed, 42 insertions(+), 43 deletions(-) diff --git a/docs-developers/server/api/reference.md b/docs-developers/server/api/reference.md index ed323d6c..561207aa 100644 --- a/docs-developers/server/api/reference.md +++ b/docs-developers/server/api/reference.md @@ -7261,8 +7261,8 @@ unparseable filter, as for the list. ### `POST /api/v1/admin/books/bulk` -Applies the same field edit to the books named in the request. The server -edits every selected book in one transaction or changes none. +Applies the same field edit to every book in the request, in one +transaction: every book is edited or none is. Select up to 1,000 books. Each path is at most 4,096 bytes. The edit itself can use up to 1 MiB. The whole body can use 5,274,112 bytes. An oversized list, edit or request returns 400 @@ -7337,10 +7337,12 @@ ending with that book's path in parentheses. ### `POST /api/v1/admin/books/merge` -*Admin only.* Replaces source spellings with a target spelling. In one -transaction, the server selects the matching books, reads their prior -overrides for the response and sets the field to the target as an `edited` override. -If any edit fails, the whole merge rolls back. +Replaces source spellings with a target spelling. In one transaction, the +server selects the matching books and sets the field to the target as an +`edited` override, so every book changes or none does. Audited as +`book.bulk_edit` with `merged` +([Audit log](../backups-and-notifications.md#audit-log)), only when books +changed. | Body field | Meaning | |---|---| @@ -7380,13 +7382,13 @@ override value, or `null` if it had none. A prior override includes its |---|---| | `400` | `too_large` if more than 5,000 books would change, more than 1,000 sources are supplied or the body exceeds 1 MiB. The server writes nothing. | | `400` | Malformed JSON or an unknown key returns `invalid request`. A field validation failure, including a negative `library_id` or unrelated series names, returns `invalid_override` with the offending `field`. | -| `401` / `403` | Authentication is required. A signed-in non-admin gets `403`. | +| `401` / `403` | anonymous / non-admin | | `404` | The supplied library ID is unknown. The response is `{"error":"library not found"}`. | | `409` | `not_book_library` if the ID belongs to a podcast library. | ### `POST /api/v1/admin/books/merge/undo` -*Admin only.* Send the original `field` and `target` with the `books` array +Send the original `field` and `target` with the `books` array from the merge response. Each book's `library_id` and `path` set the scope. The server counts a repeated path in the same library once. @@ -7404,7 +7406,8 @@ The server counts a repeated path in the same library once. If the current override still equals the target, Undo restores the prior value with its original source. For `previous: null`, it removes the override so the field follows its underlying metadata again. Undo restores eligible -books in one transaction. A write failure rolls back every restoration. +books in one transaction, so a write failure restores none. Audited as +`book.bulk_edit` with `revert`, only when it restored books. The `200` response counts restored books and lists every skip by library, path and reason. The list is empty when all books were restored. @@ -7426,8 +7429,7 @@ path and reason. The list is empty when all books were restored. Undo returns `400` with `too_large` for more than 5,000 entries in `books` or a body over 36,185,536 bytes. Malformed JSON or an unknown key returns `400` with `invalid request`. An empty list or invalid field, target or prior override -returns `400` with `invalid_override`. The same `401` and `403` rules apply -as for the merge. +returns `400` with `invalid_override`. ### `GET /api/v1/admin/authors` · `GET /api/v1/admin/narrators` diff --git a/docs-developers/server/backups-and-notifications.md b/docs-developers/server/backups-and-notifications.md index bce37cb9..53a6386d 100644 --- a/docs-developers/server/backups-and-notifications.md +++ b/docs-developers/server/backups-and-notifications.md @@ -295,10 +295,11 @@ Notes on the longer rows: is the member's username. `DELETE /me/devices/{id}?also_members=1` also records one `device_revoke` per member it signs out, with the owner's device id. -- **`book.bulk_edit`.** A spelling merge that changes books adds one **Edited - several books** entry. Its details include the target in `set`, the changed - count in `books` and the first 20 source spellings in `merged` (**Merged - spellings**), each limited to 120 characters. A merge scoped to one library +- **`book.bulk_edit`.** A bulk edit records the edit as sent (`set`, + `revert`, `add`, `remove` and so on) and the count in `books`. A spelling merge that changes books adds + one too: the target in `set`, the changed count in `books` and the first 20 + source spellings in `merged` (**Merged spellings**), each limited to 120 + characters. A merge scoped to one library also records its name in `library`. An Undo that restores books adds one entry with the field in `revert` and the restored count in `books`. - **`settings.support`.** An answer to the console's diff --git a/docs-developers/server/web-ui.md b/docs-developers/server/web-ui.md index 51c5d9f1..f78f0cc0 100644 --- a/docs-developers/server/web-ui.md +++ b/docs-developers/server/web-ui.md @@ -1175,8 +1175,8 @@ notice per series and library from `GET /admin/issues/series-spellings`: - The suggested spelling is picked first in a select. - **Use this spelling** calls `useMerge` with `series` and the group's library - ID. One merge request changes the matching main series names. **Undo** sends - the books from that response back in one request. + ID: the same merge and **Undo** as + [Library > Authors](#library--authors-narrators-and-series). - Ignore and Show again cover every one of the series' books. ##### Match automatically diff --git a/docs-users/admin/books.md b/docs-users/admin/books.md index c0d726ee..18142e06 100644 --- a/docs-users/admin/books.md +++ b/docs-users/admin/books.md @@ -385,20 +385,22 @@ book credited to two people counts for each of them. ### Merging two spellings -When two names look alike, click **Merge authors** or **Merge narrators** above -the list to use the suggested spelling. The merge covers the selected library, -or all book libraries if you haven't picked one. +When two names look alike, a suggestion appears above the list, for example +"“Sanderson, Brandon” looks like Brandon Sanderson". Click **Merge authors** (or +**Merge narrators**) to use the suggested spelling, as an edit. The merge covers +the selected library, or all book libraries if you haven't picked one. For two +names AudioSilo doesn't suggest, use a [bulk edit](#changing-many-books-at-once). -The whole credit must match. For example, merging “Sanderson, Brandon” into +Only a whole credit changes. For example, merging “Sanderson, Brandon” into “Brandon Sanderson” leaves “Sanderson, Brandon & Janci Patterson” as written. -AudioSilo saves the edit on every matching book at once. If any edit fails or -more than 5,000 books would change, it changes none. - -Choose **Undo** in the confirmation to put back any earlier edit or community -value. A credit that came from the book's tags follows its tags again. If -someone has since changed or reverted that credit, or a scan found the book -had moved, Undo skips that book and restores the others. The message lists up -to three skipped paths and counts any others. +AudioSilo changes every matching book together or none of them, and none if +more than 5,000 books would change. + +Choose **Undo** in the confirmation to put back each book's earlier name, your +earlier edit or the community value. A name that came from the book's tags +follows its tags again. Undo skips a book whose name someone has changed or +reverted since, or that a scan found had moved, and restores the others. The +message lists up to three skipped paths and counts any others. ## Series diff --git a/docs-users/admin/health.md b/docs-users/admin/health.md index cb699ff2..66ae430e 100644 --- a/docs-users/admin/health.md +++ b/docs-users/admin/health.md @@ -111,16 +111,10 @@ spelling**. AudioSilo offers this choice when books in one library spell their main series differently in capitals, accents, punctuation or spacing. **Ignore** hides the suggestion for that series. -AudioSilo changes every matching main series name at once and keeps each -book's position in the series. If any edit fails or more than 5,000 books -would change, it changes none. The merge skips books that list the series -only as an additional series. - -Choose **Undo** in the confirmation to restore any earlier series edit or -community value. A series name that came from the book's tags follows its tags -again. Undo skips books whose series name someone has since changed or -reverted, and books a scan can no longer find at their old path. It restores -the others and shows up to three skipped paths, with a count of any more. +AudioSilo changes every matching main series name and keeps each book's +position in the series. Books that list the series only as an additional series +keep their spelling. The limit, all-or-nothing rule and **Undo** work as for +[merging two spellings](books.md#merging-two-spellings) of an author. ### When a library is offline diff --git a/docs-users/admin/server.md b/docs-users/admin/server.md index 8cb3f324..b172629e 100644 --- a/docs-users/admin/server.md +++ b/docs-users/admin/server.md @@ -379,10 +379,10 @@ books, settings, backups and notifications. An Audible backup action names the account it was for. Sign-ins and listening are in [Activity](activity.md), and scans in [Health > Jobs](health.md#jobs). -After a spelling merge, look for **Edited several books**. **Merged spellings** -lists the old spellings, and the entry shows the spelling you chose, how many -books changed and the library if you picked one. When **Undo** restores books, -a second entry shows the field under **Reverted** and how many books it restored. +A spelling merge shows as **Edited several books**, with the spelling you +chose, how many books changed and the library, if you picked one. **Merged +spellings** lists the old spellings. An **Undo** that restores books adds a +second entry, with what it put back under **Reverted** and how many books. The log never holds a password or other secret, and no IP addresses. Entries are kept for a year. From 2531b57f9e9e699abfd8a05cb2aca87f630d87cf Mon Sep 17 00:00:00 2001 From: KodeStar Date: Sun, 22 Nov 2026 18:13:44 +0000 Subject: [PATCH 3/6] Keep the server-names pin on a server main commit The snapshot pinned the merge branch's commit, which a squash merge leaves off server main. The lint reads only the committed names (the ref appears in its messages), so the pin stays on the main commit it was synced from and the two merge routes are added by hand until the next names:sync. Part of the v2.7.0 burn-down (atomic spelling merges). --- scripts/server-names.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/server-names.json b/scripts/server-names.json index 5b4e088b..2cdad314 100644 --- a/scripts/server-names.json +++ b/scripts/server-names.json @@ -1,6 +1,6 @@ { "repo": "KodeStar/audiosilo-server", - "ref": "2419ff713de3530041d894879c09f1967a01f49b", + "ref": "d91029684a73476096a7c8691effbdfd57db28c8", "capabilities": [ "addresses", "admin_ui", From e93bc025c75a852e18f6eb0a15b7fac37dcdafd4 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Sun, 22 Nov 2026 18:18:35 +0000 Subject: [PATCH 4/6] Name each merge validation field and Undo's library handling The merge's invalid_override row now says which field each refusal names (a too-long target names the merged field, not target), and Undo states that an unknown or podcast library's books come back as not_found, not a 404, so a client does not wait for an error that never comes. Part of the v2.7.0 burn-down (atomic spelling merges). --- docs-developers/server/api/reference.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs-developers/server/api/reference.md b/docs-developers/server/api/reference.md index 561207aa..65d8fed8 100644 --- a/docs-developers/server/api/reference.md +++ b/docs-developers/server/api/reference.md @@ -7381,7 +7381,7 @@ override value, or `null` if it had none. A prior override includes its | Status | When it applies | |---|---| | `400` | `too_large` if more than 5,000 books would change, more than 1,000 sources are supplied or the body exceeds 1 MiB. The server writes nothing. | -| `400` | Malformed JSON or an unknown key returns `invalid request`. A field validation failure, including a negative `library_id` or unrelated series names, returns `invalid_override` with the offending `field`. | +| `400` | Malformed JSON or an unknown key returns `invalid request`. A validation failure returns `invalid_override` with `field`: `field` for an unknown field name, `library_id` for a negative ID, `sources` for an empty list, a blank source or unrelated series names, `target` for a blank target, and the merged field's own name (`author`, `narrator` or `series`) for a target that is too long or holds control characters. | | `401` / `403` | anonymous / non-admin | | `404` | The supplied library ID is unknown. The response is `{"error":"library not found"}`. | | `409` | `not_book_library` if the ID belongs to a podcast library. | @@ -7429,7 +7429,9 @@ path and reason. The list is empty when all books were restored. Undo returns `400` with `too_large` for more than 5,000 entries in `books` or a body over 36,185,536 bytes. Malformed JSON or an unknown key returns `400` with `invalid request`. An empty list or invalid field, target or prior override -returns `400` with `invalid_override`. +returns `400` with `invalid_override`, and the `401` / `403` rule is the +merge's. An unknown or podcast library is not an error here: its books are +skipped as `not_found`. ### `GET /api/v1/admin/authors` · `GET /api/v1/admin/narrators` From 826546086105bd1d7fc40fdbb918920b052bd6e8 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Sun, 22 Nov 2026 18:18:35 +0000 Subject: [PATCH 5/6] Match the merge's audit entry and Undo wording to what they record The audit log keeps up to 20 merged spellings and only the field name under Reverted, and records the library whenever the merge covered one (always for a Health series merge). A series merge covers its library only, and Undo returns a name to the book's files or folder, not only its tags. Part of the v2.7.0 burn-down (atomic spelling merges). --- docs-users/admin/books.md | 4 ++-- docs-users/admin/health.md | 6 +++--- docs-users/admin/server.md | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs-users/admin/books.md b/docs-users/admin/books.md index 18142e06..f08087b0 100644 --- a/docs-users/admin/books.md +++ b/docs-users/admin/books.md @@ -397,8 +397,8 @@ AudioSilo changes every matching book together or none of them, and none if more than 5,000 books would change. Choose **Undo** in the confirmation to put back each book's earlier name, your -earlier edit or the community value. A name that came from the book's tags -follows its tags again. Undo skips a book whose name someone has changed or +earlier edit or the community value. A name that came from the book's files or +folder follows them again. Undo skips a book whose name someone has changed or reverted since, or that a scan found had moved, and restores the others. The message lists up to three skipped paths and counts any others. diff --git a/docs-users/admin/health.md b/docs-users/admin/health.md index 66ae430e..aebd3f9d 100644 --- a/docs-users/admin/health.md +++ b/docs-users/admin/health.md @@ -111,9 +111,9 @@ spelling**. AudioSilo offers this choice when books in one library spell their main series differently in capitals, accents, punctuation or spacing. **Ignore** hides the suggestion for that series. -AudioSilo changes every matching main series name and keeps each book's -position in the series. Books that list the series only as an additional series -keep their spelling. The limit, all-or-nothing rule and **Undo** work as for +AudioSilo changes every matching main series name in that library and keeps +each book's position in the series. Books that list the series only as an +additional series keep their spelling. The limit, all-or-nothing rule and **Undo** work as for [merging two spellings](books.md#merging-two-spellings) of an author. ### When a library is offline diff --git a/docs-users/admin/server.md b/docs-users/admin/server.md index b172629e..4fe57d6c 100644 --- a/docs-users/admin/server.md +++ b/docs-users/admin/server.md @@ -380,9 +380,10 @@ account it was for. Sign-ins and listening are in [Activity](activity.md), and scans in [Health > Jobs](health.md#jobs). A spelling merge shows as **Edited several books**, with the spelling you -chose, how many books changed and the library, if you picked one. **Merged -spellings** lists the old spellings. An **Undo** that restores books adds a -second entry, with what it put back under **Reverted** and how many books. +chose, how many books changed and the library, when the merge covered one +library. **Merged spellings** lists up to 20 of the old spellings. An **Undo** +that restores books adds a second entry, with the field it put back (for example +"author") under **Reverted** and how many books. The log never holds a password or other secret, and no IP addresses. Entries are kept for a year. From cb7ed01aada6ac9d882c3fdbb66f32d8ba2e5b1a Mon Sep 17 00:00:00 2001 From: KodeStar Date: Sun, 22 Nov 2026 18:24:46 +0000 Subject: [PATCH 6/6] Pin the server names to the merged spelling-merge commit --- scripts/server-names.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/server-names.json b/scripts/server-names.json index 2cdad314..640b6c82 100644 --- a/scripts/server-names.json +++ b/scripts/server-names.json @@ -1,6 +1,6 @@ { "repo": "KodeStar/audiosilo-server", - "ref": "d91029684a73476096a7c8691effbdfd57db28c8", + "ref": "84556ddb12d396cff33a154dde8201e003099516", "capabilities": [ "addresses", "admin_ui",