[PR #4008] [MERGED] Re-sort title-sorted bookshelf after title change #4145

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4008
Author: @mikiher
Created: 2/19/2025
Status: Merged
Merged: 2/20/2025
Merged by: @advplyr

Base: masterHead: resort-after-title-change


📝 Commits (2)

  • 2e8cb46 Resort title-sorted bookshelf after title change
  • f04ef32 Restore scroll position on title change re-sort

📊 Changes

1 file changed (+18 additions, -4 deletions)

View changed files

📝 client/components/app/LazyBookshelf.vue (+18 -4)

📄 Description

Brief summary

When a bookshelf is sorted by title and the title of a book/podcast changes (e.g. after being edited), the bookshelf is rebuilt so the book appears at its proper position (based on its new title)

Which issue is fixed?

Fixes #3998

In-depth Description

Up until now, when LazyBookshelf got an item_updated message from the server, it only replaced the old entity with the updated entity. With this change, if the current sort order is by title, and a change of title is detected, resetEntities() is called, and the item is moved to its new position.

How have you tested this?

Changed title of books/podcasts and verified that after saving the change, the book/podcast moved to its new position.


🔄 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/4008 **Author:** [@mikiher](https://github.com/mikiher) **Created:** 2/19/2025 **Status:** ✅ Merged **Merged:** 2/20/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `resort-after-title-change` --- ### 📝 Commits (2) - [`2e8cb46`](https://github.com/advplyr/audiobookshelf/commit/2e8cb46c57081354e98a1f51a63be4a59eeca183) Resort title-sorted bookshelf after title change - [`f04ef32`](https://github.com/advplyr/audiobookshelf/commit/f04ef320aae0071172255adad607b6e53f3e0fb8) Restore scroll position on title change re-sort ### 📊 Changes **1 file changed** (+18 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `client/components/app/LazyBookshelf.vue` (+18 -4) </details> ### 📄 Description ## Brief summary When a bookshelf is sorted by title and the title of a book/podcast changes (e.g. after being edited), the bookshelf is rebuilt so the book appears at its proper position (based on its new title) ## Which issue is fixed? Fixes #3998 ## In-depth Description Up until now, when `LazyBookshelf` got an `item_updated` message from the server, it only replaced the old entity with the updated entity. With this change, if the current sort order is by title, and a change of title is detected, `resetEntities()` is called, and the item is moved to its new position. ## How have you tested this? Changed title of books/podcasts and verified that after saving the change, the book/podcast moved to its new position. --- <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:32 +02:00
adam closed this issue 2026-04-25 00:18:32 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4145