[PR #1111] [MERGED] Makes it so the when sorting and ignoring prefixes, prefixes are actually ignored #3450

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/1111
Author: @ruoti
Created: 11/3/2022
Status: Merged
Merged: 11/4/2022
Merged by: @advplyr

Base: masterHead: fix-sortIgnorePrefix


📝 Commits (1)

  • 473257f Makes it so the when sorting and ignoring prefixes, they are actually ignored

📊 Changes

6 files changed (+45 additions, -32 deletions)

View changed files

📝 server/controllers/LibraryController.js (+1 -1)
📝 server/objects/metadata/BookMetadata.js (+13 -3)
📝 server/objects/metadata/PodcastMetadata.js (+7 -11)
📝 server/objects/metadata/VideoMetadata.js (+7 -11)
📝 server/utils/index.js (+14 -4)
📝 server/utils/libraryHelpers.js (+3 -2)

📄 Description

I noticed that when sorting with ignore prefix on, items were not actually sorted correctly. For example, imagine having three items:

"The A"
"The A B"
"The A C"

This sorted to
"A B, The"
"A C, The"
"A, The"

This happens because the ", The" is part of the sort operation. I've modified the code so that is no longer the case. I chose to leave the Vue side of things alone, so the true sort value is only available to the server.


🔄 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/1111 **Author:** [@ruoti](https://github.com/ruoti) **Created:** 11/3/2022 **Status:** ✅ Merged **Merged:** 11/4/2022 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `fix-sortIgnorePrefix` --- ### 📝 Commits (1) - [`473257f`](https://github.com/advplyr/audiobookshelf/commit/473257f65eabf88a87a2ffb6fb3bf6750872ec9c) Makes it so the when sorting and ignoring prefixes, they are actually ignored ### 📊 Changes **6 files changed** (+45 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `server/controllers/LibraryController.js` (+1 -1) 📝 `server/objects/metadata/BookMetadata.js` (+13 -3) 📝 `server/objects/metadata/PodcastMetadata.js` (+7 -11) 📝 `server/objects/metadata/VideoMetadata.js` (+7 -11) 📝 `server/utils/index.js` (+14 -4) 📝 `server/utils/libraryHelpers.js` (+3 -2) </details> ### 📄 Description I noticed that when sorting with ignore prefix on, items were not actually sorted correctly. For example, imagine having three items: "The A" "The A B" "The A C" This sorted to "A B, The" "A C, The" "A, The" This happens because the ", The" is part of the sort operation. I've modified the code so that is no longer the case. I chose to leave the Vue side of things alone, so the true sort value is only available to the server. --- <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:15:42 +02:00
adam closed this issue 2026-04-25 00:15:42 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3450