[PR #3414] [MERGED] Improved handling of Authors and Series with names containing non-ASCII characters #3964

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3414
Author: @thatguy7
Created: 9/13/2024
Status: Merged
Merged: 9/13/2024
Merged by: @advplyr

Base: masterHead: master


📝 Commits (2)

  • def34a8 when checking if series/author is alread in DB, use case insensitive match only for ASCII names
  • 0af29a3 use asciiOnlyToLowerCase to match lower function behaviour of SQLite

📊 Changes

2 files changed (+4 additions, -2 deletions)

View changed files

📝 server/models/Author.js (+2 -1)
📝 server/models/Series.js (+2 -1)

📄 Description

This PR fixes: https://github.com/advplyr/audiobookshelf/issues/2541

In summary: SQLite does not support the LOWER/UPPER function (unless it is compiled to do so, which it usually is not).

When checking if a Series/Author is already in the DB, these functions are used. Any name containing a capital non-ASCII character would always test as false and thus a new entry in the DB was created every time.

This checks is the name contains a non-ASCII character. If it does, the lower function is not used and the issue is avoided.

Should we not use the lower function at all to avoid this issue?


🔄 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/3414 **Author:** [@thatguy7](https://github.com/thatguy7) **Created:** 9/13/2024 **Status:** ✅ Merged **Merged:** 9/13/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`def34a8`](https://github.com/advplyr/audiobookshelf/commit/def34a860b4fb1d32f199161139e052ff3b78add) when checking if series/author is alread in DB, use case insensitive match only for ASCII names - [`0af29a3`](https://github.com/advplyr/audiobookshelf/commit/0af29a378a98417856e96dd7a6f296ae69095f4a) use asciiOnlyToLowerCase to match lower function behaviour of SQLite ### 📊 Changes **2 files changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `server/models/Author.js` (+2 -1) 📝 `server/models/Series.js` (+2 -1) </details> ### 📄 Description This PR fixes: https://github.com/advplyr/audiobookshelf/issues/2541 In summary: SQLite does not support the `LOWER`/`UPPER` function (unless it is compiled to do so, which it usually is not). When checking if a Series/Author is already in the DB, these functions are used. Any name containing a capital non-ASCII character would always test as false and thus a new entry in the DB was created every time. This checks is the name contains a non-ASCII character. If it does, the `lower` function is not used and the issue is avoided. Should we not use the `lower` function at all to avoid this issue? --- <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:17:45 +02:00
adam closed this issue 2026-04-25 00:17:45 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3964