[PR #4234] [MERGED] Fix server crash when updating excluded prefixes #4221 #4193

Closed
opened 2026-04-25 00:18:44 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4234
Author: @advplyr
Created: 4/28/2025
Status: Merged
Merged: 4/28/2025
Merged by: @advplyr

Base: masterHead: fix_exclude_prefixes_crash


📝 Commits (1)

  • 5eaf9c6 Fix server crash when updating excluded prefixes #4221

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 server/controllers/MiscController.js (+3 -1)

📄 Description

Brief summary

When updating the "Ignore prefixes when sorting" list in server settings, the server will crash when a series name has to be updated.

Which issue is fixed?

Fixes #4221

In-depth Description

When using the updateOnDuplicate option to bulk update we have to pass in all key/values that have a unique constraint.

The unique constraint for libraryId and name was added in v2.14.0 from PR #3417

That was 8 months ago so I suspect this bug was actually introduced when updating to sqlite v3.44.2 from v3.41.1 for v2.20.0. I wasn't able to find anything specific to this in the sqlite changelogs though.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/4234 **Author:** [@advplyr](https://github.com/advplyr) **Created:** 4/28/2025 **Status:** ✅ Merged **Merged:** 4/28/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `fix_exclude_prefixes_crash` --- ### 📝 Commits (1) - [`5eaf9c6`](https://github.com/advplyr/audiobookshelf/commit/5eaf9c69ad71342444211c24029140a997d55439) Fix server crash when updating excluded prefixes #4221 ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/controllers/MiscController.js` (+3 -1) </details> ### 📄 Description <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. If you do not follow this template, the PR may be closed without review. Please ensure all checks pass. If you are a new contributor, the workflows will need to be manually approved before they run. --> ## Brief summary When updating the "Ignore prefixes when sorting" list in server settings, the server will crash when a series name has to be updated. ## Which issue is fixed? Fixes #4221 ## In-depth Description When using the [updateOnDuplicate](https://sequelize.org/api/v7/interfaces/_sequelize_core.index.bulkcreateoptions#updateonduplicate) option to bulk update we have to pass in all key/values that have a unique constraint. The unique constraint for `libraryId` and `name` was added in [v2.14.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.14.0) from PR #3417 That was 8 months ago so I suspect this bug was actually introduced when updating to sqlite `v3.44.2` from `v3.41.1` for [v2.20.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.20.0). I wasn't able to find anything specific to this in the sqlite changelogs though. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:44 +02:00
adam closed this issue 2026-04-25 00:18:44 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4193