[PR #3721] [MERGED] Refactor Feed model to create new feed for library item #4061

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3721
Author: @advplyr
Created: 12/15/2024
Status: Merged
Merged: 12/15/2024
Merged by: @advplyr

Base: masterHead: refactor-feeds-from-item


📝 Commits (1)

  • 9bd1f9e Refactor Feed model to create new feed for library item

📊 Changes

7 files changed (+399 additions, -111 deletions)

View changed files

📝 server/controllers/RSSFeedController.js (+17 -12)
📝 server/managers/RssFeedManager.js (+29 -12)
📝 server/models/Book.js (+29 -0)
📝 server/models/Feed.js (+138 -6)
📝 server/models/FeedEpisode.js (+165 -23)
📝 server/models/LibraryItem.js (+21 -0)
📝 server/objects/Feed.js (+0 -58)

📄 Description

Brief summary

Begin migrating Feed and FeedEpisode to use the new model.

This PR updates the create feed for library item logic to use the new models in /models folder instead of the old models in the /objects folder.

In-depth Description

The objective for the migration is to eventually remove the old models. In the meantime the API will return the same data so the new models will implement toOldJSON functions when necessary.

For the first step of the migration, creating feeds from library items is handled in the new Feed and FeedEpisode models.

This also adds necessary helper functions in the LibraryItem and Book models.

How have you tested this?

Tested opening feeds for both audiobooks and podcasts. Tested opening feeds with options (prevent indexing, owner name, owner email).


🔄 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/3721 **Author:** [@advplyr](https://github.com/advplyr) **Created:** 12/15/2024 **Status:** ✅ Merged **Merged:** 12/15/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `refactor-feeds-from-item` --- ### 📝 Commits (1) - [`9bd1f9e`](https://github.com/advplyr/audiobookshelf/commit/9bd1f9e3d570401a6f5146bdd2384ade7a0c26e8) Refactor Feed model to create new feed for library item ### 📊 Changes **7 files changed** (+399 additions, -111 deletions) <details> <summary>View changed files</summary> 📝 `server/controllers/RSSFeedController.js` (+17 -12) 📝 `server/managers/RssFeedManager.js` (+29 -12) 📝 `server/models/Book.js` (+29 -0) 📝 `server/models/Feed.js` (+138 -6) 📝 `server/models/FeedEpisode.js` (+165 -23) 📝 `server/models/LibraryItem.js` (+21 -0) 📝 `server/objects/Feed.js` (+0 -58) </details> ### 📄 Description ## Brief summary Begin migrating `Feed` and `FeedEpisode` to use the new model. This PR updates the create feed for library item logic to use the new models in `/models` folder instead of the old models in the `/objects` folder. ## In-depth Description The objective for the migration is to eventually remove the old models. In the meantime the API will return the same data so the new models will implement `toOldJSON` functions when necessary. For the first step of the migration, creating feeds from library items is handled in the new `Feed` and `FeedEpisode` models. This also adds necessary helper functions in the `LibraryItem` and `Book` models. ## How have you tested this? Tested opening feeds for both audiobooks and podcasts. Tested opening feeds with options (prevent indexing, owner name, owner email). --- <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:10 +02:00
adam closed this issue 2026-04-25 00:18:10 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4061