mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 17:24:57 +02:00
Remove old Feed/FeedEpisode/FeedMeta objects
This commit is contained in:
parent
de8a9304d2
commit
b39268ccb0
17 changed files with 84 additions and 326 deletions
|
@ -762,7 +762,7 @@ class LibraryController {
|
|||
|
||||
if (include.includes('rssfeed')) {
|
||||
const feedObj = await RssFeedManager.findFeedForEntityId(seriesJson.id)
|
||||
seriesJson.rssFeed = feedObj?.toJSONMinified() || null
|
||||
seriesJson.rssFeed = feedObj?.toOldJSONMinified() || null
|
||||
}
|
||||
|
||||
res.json(seriesJson)
|
||||
|
|
|
@ -51,7 +51,7 @@ class LibraryItemController {
|
|||
|
||||
if (includeEntities.includes('rssfeed')) {
|
||||
const feedData = await RssFeedManager.findFeedForEntityId(item.id)
|
||||
item.rssFeed = feedData?.toJSONMinified() || null
|
||||
item.rssFeed = feedData?.toOldJSONMinified() || null
|
||||
}
|
||||
|
||||
if (item.mediaType === 'book' && req.user.isAdminOrUp && includeEntities.includes('share')) {
|
||||
|
|
|
@ -25,8 +25,8 @@ class RSSFeedController {
|
|||
async getAll(req, res) {
|
||||
const feeds = await RssFeedManager.getFeeds()
|
||||
res.json({
|
||||
feeds: feeds.map((f) => f.toJSON()),
|
||||
minified: feeds.map((f) => f.toJSONMinified())
|
||||
feeds: feeds.map((f) => f.toOldJSON()),
|
||||
minified: feeds.map((f) => f.toOldJSONMinified())
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ class RSSFeedController {
|
|||
}
|
||||
|
||||
// Check that this slug is not being used for another feed (slug will also be the Feed id)
|
||||
if (await RssFeedManager.findFeedBySlug(reqBody.slug)) {
|
||||
if (await RssFeedManager.checkExistsBySlug(reqBody.slug)) {
|
||||
Logger.error(`[RSSFeedController] Cannot open RSS feed because slug "${reqBody.slug}" is already in use`)
|
||||
return res.status(400).send('Slug already in use')
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ class RSSFeedController {
|
|||
}
|
||||
|
||||
// Check that this slug is not being used for another feed (slug will also be the Feed id)
|
||||
if (await RssFeedManager.findFeedBySlug(reqBody.slug)) {
|
||||
if (await RssFeedManager.checkExistsBySlug(reqBody.slug)) {
|
||||
Logger.error(`[RSSFeedController] Cannot open RSS feed because slug "${reqBody.slug}" is already in use`)
|
||||
return res.status(400).send('Slug already in use')
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ class RSSFeedController {
|
|||
}
|
||||
|
||||
// Check that this slug is not being used for another feed (slug will also be the Feed id)
|
||||
if (await RssFeedManager.findFeedBySlug(reqBody.slug)) {
|
||||
if (await RssFeedManager.checkExistsBySlug(reqBody.slug)) {
|
||||
Logger.error(`[RSSFeedController] Cannot open RSS feed because slug "${reqBody.slug}" is already in use`)
|
||||
return res.status(400).send('Slug already in use')
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ class SeriesController {
|
|||
|
||||
if (include.includes('rssfeed')) {
|
||||
const feedObj = await RssFeedManager.findFeedForEntityId(seriesJson.id)
|
||||
seriesJson.rssFeed = feedObj?.toJSONMinified() || null
|
||||
seriesJson.rssFeed = feedObj?.toOldJSONMinified() || null
|
||||
}
|
||||
|
||||
res.json(seriesJson)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue