[PR #3212] [MERGED] On item pages, fetch the item's library data to the store if it's not available #3904

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3212
Author: @mikiher
Created: 7/30/2024
Status: Merged
Merged: 7/30/2024
Merged by: @advplyr

Base: masterHead: library-fetch


📝 Commits (4)

  • 897c3ea on item pages, fetch item's library data if unavailable
  • 03818fa Remove unnecessary setCurrentLibrary on mounted item page
  • 0062411 Replace setCurrentLibrary calls with fetch to ensure filterData matches library
  • 34cb7a4 Remove unused loadLibraryFilterData func

📊 Changes

4 files changed (+17 additions, -30 deletions)

View changed files

📝 client/pages/author/_id.vue (+2 -2)
📝 client/pages/item/_id/index.vue (+3 -4)
📝 client/pages/library/_library/podcast/download-queue.vue (+12 -8)
📝 client/store/libraries.js (+0 -16)

📄 Description

This fixes #3209

The fix fixes the problem by making sure filterData is available in the store when the item page is loaded.

There might be some refactoring needed in libraries.js to make sure that dependent state variables are updated together. Currently for example, it is possible to change the currentLibraryId without trigerring a library fetch, which leaves the libraries state in an incosistent state (filterData is not updated, for example). Let me know what you think.


🔄 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/3212 **Author:** [@mikiher](https://github.com/mikiher) **Created:** 7/30/2024 **Status:** ✅ Merged **Merged:** 7/30/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `library-fetch` --- ### 📝 Commits (4) - [`897c3ea`](https://github.com/advplyr/audiobookshelf/commit/897c3ea62576888949838c7302014ba1399dcf2e) on item pages, fetch item's library data if unavailable - [`03818fa`](https://github.com/advplyr/audiobookshelf/commit/03818fadee5eea921c7bcecce1e6751b6cafcd8d) Remove unnecessary setCurrentLibrary on mounted item page - [`0062411`](https://github.com/advplyr/audiobookshelf/commit/006241163bed025e33bdebbd23aa285de1570599) Replace setCurrentLibrary calls with fetch to ensure filterData matches library - [`34cb7a4`](https://github.com/advplyr/audiobookshelf/commit/34cb7a4d021bc44cd7993dcc6c65b2e864d40527) Remove unused loadLibraryFilterData func ### 📊 Changes **4 files changed** (+17 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `client/pages/author/_id.vue` (+2 -2) 📝 `client/pages/item/_id/index.vue` (+3 -4) 📝 `client/pages/library/_library/podcast/download-queue.vue` (+12 -8) 📝 `client/store/libraries.js` (+0 -16) </details> ### 📄 Description This fixes #3209 The fix fixes the problem by making sure filterData is available in the store when the item page is loaded. There might be some refactoring needed in libraries.js to make sure that dependent state variables are updated together. Currently for example, it is possible to change the currentLibraryId without trigerring a library fetch, which leaves the libraries state in an incosistent state (filterData is not updated, for example). Let me know what you think. --- <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:30 +02:00
adam closed this issue 2026-04-25 00:17:30 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3904