[Bug]: Collection's RSS Feed pubDate is wrong #2582

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

Originally created by @GKeckD2D on GitHub (Feb 15, 2025).

What happened?

I created a new collection and added a book to the collection.
Book1
<pubDate>Mon, 19 Aug 2024 19:02:37 GMT</pubDate>
Book2
<pubDate>Mon, 19 Aug 2024 19:03:37 GMT</pubDate>

With this date, podcast players will see this as old and not download newly added books.

What did you expect to happen?

I expected the pubDate to reflect when the book was added to the collection, not a random date back in 2024.
If pubDate is set to the current date and time, podcast players will see it as new content and download them.

Steps to reproduce the issue

  1. Crate a new collection
  2. Open an RSS feed for that collection
  3. Check pubDate of any book in the collection

Audiobookshelf version

2.19.2

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Firefox

Logs

2025-02-15 13:32:39.172

INFO

[RssFeedManager] Creating RSS feed for collection "One Offs"

2025-02-15 13:32:39.203

DEBUG

[ApiCacheManager] feed.afterCreate: Clearing cache

2025-02-15 13:32:39.206

INFO

[FeedEpisode] Upserting 1 episodes for feed e7f899d5-6158-407c-bb47-08e668ded340 (0 existing)

2025-02-15 13:32:39.217

DEBUG

[ApiCacheManager] Array.afterBulkCreate: Clearing cache

2025-02-15 13:32:39.229

INFO

[RssFeedManager] Opened RSS feed "/feed/singles"

2025-02-15 13:32:52.334

INFO

[Server] Requesting rss feed singles

2025-02-15 13:32:58.727

DEBUG

[ApiCacheManager] count: 0 size: 0

2025-02-15 13:32:58.755

DEBUG

[ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/a6b301f2-882b-456e-9937-f311a4a8c911?include=filterdata"}

2025-02-15 13:32:58.811

DEBUG

[ApiCacheManager] count: 1 size: 51741

2025-02-15 13:32:58.820

DEBUG

[LibraryItemsBookFilters] findOptionsKey: {"where":[{}],"distinct":true,"attributes":null,"replacements":{},"include":[{"required":true,"where":{"libraryId":"a6b301f2-882b-456e-9937-f311a4a8c911"},"include":[{"required":false,"separate":true}]},{"attributes":["id","seriesId","sequence","createdAt"],"include":{"attributes":["id","name","nameIgnorePrefix"]},"order":[["createdAt","ASC"]],"separate":true},{"attributes":["authorId","createdAt"],"include":{"attributes":["id","name"]},"order":[["createdAt","ASC"]],"separate":true}],"order":[[{"val":"libraryItem.mtime"},"DESC"]],"subQuery":false}

2025-02-15 13:32:59.299

DEBUG

Loaded 36 of 1230 items for libary page in 0.48s

2025-02-15 13:32:59.310

DEBUG

[ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/a6b301f2-882b-456e-9937-f311a4a8c911/items?sort=mtimeMs&desc=1&limit=36&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share"}

2025-02-15 13:33:01.524

INFO

[Watcher] "The Library" Ready

2025-02-15 13:33:03.674

DEBUG

[ApiCacheManager] count: 2 size: 130629

2025-02-15 13:33:03.828

DEBUG

[ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/a6b301f2-882b-456e-9937-f311a4a8c911/collections"}

2025-02-15 13:33:05.721

DEBUG

[ApiCacheManager] collectionBook.afterCreate: Clearing cache

2025-02-15 13:33:10.913

INFO

[Server] Requesting rss feed singles

2025-02-15 13:33:10.932

INFO

[RssFeedManager] Feed "One Offs" requires update - updating feed

2025-02-15 13:33:11.004

DEBUG

[ApiCacheManager] feed.afterUpdate: Clearing cache

2025-02-15 13:33:11.007

INFO

[FeedEpisode] Upserting 2 episodes for feed e7f899d5-6158-407c-bb47-08e668ded340 (1 existing)

2025-02-15 13:33:11.013

DEBUG

[ApiCacheManager] Array.afterBulkCreate: Clearing cache

2025-02-15 13:34:00.093

INFO

[Server] Requesting rss feed singles

2025-02-15 13:34:00.285

INFO

[Server] Requesting rss feed singles

Additional Notes

No response

Originally created by @GKeckD2D on GitHub (Feb 15, 2025). ### What happened? I created a new collection and added a book to the collection. Book1 `<pubDate>Mon, 19 Aug 2024 19:02:37 GMT</pubDate>` Book2 `<pubDate>Mon, 19 Aug 2024 19:03:37 GMT</pubDate>` With this date, podcast players will see this as old and not download newly added books. ### What did you expect to happen? I expected the pubDate to reflect when the book was added to the collection, not a random date back in 2024. If pubDate is set to the current date and time, podcast players will see it as new content and download them. ### Steps to reproduce the issue 1. Crate a new collection 2. Open an RSS feed for that collection 3. Check pubDate of any book in the collection ### Audiobookshelf version 2.19.2 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Firefox ### Logs ```shell 2025-02-15 13:32:39.172 INFO [RssFeedManager] Creating RSS feed for collection "One Offs" 2025-02-15 13:32:39.203 DEBUG [ApiCacheManager] feed.afterCreate: Clearing cache 2025-02-15 13:32:39.206 INFO [FeedEpisode] Upserting 1 episodes for feed e7f899d5-6158-407c-bb47-08e668ded340 (0 existing) 2025-02-15 13:32:39.217 DEBUG [ApiCacheManager] Array.afterBulkCreate: Clearing cache 2025-02-15 13:32:39.229 INFO [RssFeedManager] Opened RSS feed "/feed/singles" 2025-02-15 13:32:52.334 INFO [Server] Requesting rss feed singles 2025-02-15 13:32:58.727 DEBUG [ApiCacheManager] count: 0 size: 0 2025-02-15 13:32:58.755 DEBUG [ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/a6b301f2-882b-456e-9937-f311a4a8c911?include=filterdata"} 2025-02-15 13:32:58.811 DEBUG [ApiCacheManager] count: 1 size: 51741 2025-02-15 13:32:58.820 DEBUG [LibraryItemsBookFilters] findOptionsKey: {"where":[{}],"distinct":true,"attributes":null,"replacements":{},"include":[{"required":true,"where":{"libraryId":"a6b301f2-882b-456e-9937-f311a4a8c911"},"include":[{"required":false,"separate":true}]},{"attributes":["id","seriesId","sequence","createdAt"],"include":{"attributes":["id","name","nameIgnorePrefix"]},"order":[["createdAt","ASC"]],"separate":true},{"attributes":["authorId","createdAt"],"include":{"attributes":["id","name"]},"order":[["createdAt","ASC"]],"separate":true}],"order":[[{"val":"libraryItem.mtime"},"DESC"]],"subQuery":false} 2025-02-15 13:32:59.299 DEBUG Loaded 36 of 1230 items for libary page in 0.48s 2025-02-15 13:32:59.310 DEBUG [ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/a6b301f2-882b-456e-9937-f311a4a8c911/items?sort=mtimeMs&desc=1&limit=36&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share"} 2025-02-15 13:33:01.524 INFO [Watcher] "The Library" Ready 2025-02-15 13:33:03.674 DEBUG [ApiCacheManager] count: 2 size: 130629 2025-02-15 13:33:03.828 DEBUG [ApiCacheManager] Cache miss: {"user":"root","url":"/libraries/a6b301f2-882b-456e-9937-f311a4a8c911/collections"} 2025-02-15 13:33:05.721 DEBUG [ApiCacheManager] collectionBook.afterCreate: Clearing cache 2025-02-15 13:33:10.913 INFO [Server] Requesting rss feed singles 2025-02-15 13:33:10.932 INFO [RssFeedManager] Feed "One Offs" requires update - updating feed 2025-02-15 13:33:11.004 DEBUG [ApiCacheManager] feed.afterUpdate: Clearing cache 2025-02-15 13:33:11.007 INFO [FeedEpisode] Upserting 2 episodes for feed e7f899d5-6158-407c-bb47-08e668ded340 (1 existing) 2025-02-15 13:33:11.013 DEBUG [ApiCacheManager] Array.afterBulkCreate: Clearing cache 2025-02-15 13:34:00.093 INFO [Server] Requesting rss feed singles 2025-02-15 13:34:00.285 INFO [Server] Requesting rss feed singles ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:08:36 +02:00
adam closed this issue 2026-04-25 00:08:36 +02:00
Author
Owner

@nichwall commented on GitHub (Feb 15, 2025):

The pubdates for items in an RSS feed is set based on the ordering of items in the collection, which does not necessarily follow publication order, such as alternative reading orders.

You can also reorder the items within the collection, which should update the pubdate to show the new ordering of the collection within the RSS feed.

@nichwall commented on GitHub (Feb 15, 2025): The pubdates for items in an RSS feed is set based on the ordering of items in the collection, which does not necessarily follow publication order, such as alternative reading orders. You can also reorder the items within the collection, which should update the pubdate to show the new ordering of the collection within the RSS feed.
Author
Owner

@GKeckD2D commented on GitHub (Feb 15, 2025):

I am sorry, I'm describing my issue poorly.
pubDate is what podcast players look at to check for new content. If the date is older than the last time the player checked for new content, it considers it old content and ignore it. The RSS feed's pubDate shouldn't have anything to do with the book's publication date.

The collection and RSS feed ordering match. That isn't the issue.

The Aug 2024 date itself is not a date associated with the book in the collection as far as I can tell.
I expected the pubDate in the RSS feed to be the date the collection was created and the pubDate of any books added to the collection to be the time and date the book was added to the collection. Instead, it seems to have pulled a date out of the air for the first book and incremented it by +1 minute for each additional book.

@GKeckD2D commented on GitHub (Feb 15, 2025): I am sorry, I'm describing my issue poorly. pubDate is what podcast players look at to check for new content. If the date is older than the last time the player checked for new content, it considers it old content and ignore it. The RSS feed's pubDate shouldn't have anything to do with the book's publication date. The collection and RSS feed ordering match. That isn't the issue. The Aug 2024 date itself is not a date associated with the book in the collection as far as I can tell. I expected the pubDate in the RSS feed to be the date the collection was created and the pubDate of any books added to the collection to be the time and date the book was added to the collection. Instead, it seems to have pulled a date out of the air for the first book and incremented it by +1 minute for each additional book.
Author
Owner

@nichwall commented on GitHub (Feb 15, 2025):

I'm confused. Is not showing older pubdates as new something specific to what you are using to view the RSS feed (like a specific app)?

The one minute increment is used to ensure multi-track items are ordered correctly (such as a book with a chapter per file). The increment used to be by 1 second, but this was recently changed to be 1 minute to help sorting.

Some more context in https://github.com/advplyr/audiobookshelf/issues/3137 and https://github.com/advplyr/audiobookshelf/issues/3442

@nichwall commented on GitHub (Feb 15, 2025): I'm confused. Is not showing older pubdates as new something specific to what you are using to view the RSS feed (like a specific app)? The one minute increment is used to ensure multi-track items are ordered correctly (such as a book with a chapter per file). The increment used to be by 1 second, but this was recently changed to be 1 minute to help sorting. Some more context in https://github.com/advplyr/audiobookshelf/issues/3137 and https://github.com/advplyr/audiobookshelf/issues/3442
Author
Owner

@GKeckD2D commented on GitHub (Feb 15, 2025):

It isn't you. It is me and the way I use ABS. I do not use ABS to listen to the RSS feeds created by ABS. I'm using Overcast, but other podcast players also show the newly added books as old because the RSS feed has the pubDate is set to Aug 2024, instead of when the book was added to the RSS feed.
ABS is using the RSS standard pubDate in a way that is unexpected by other podcast players and stopping other podcast players from working as expected. Presumably it works fine in the ABS app, but I don't use or have that to check.

@GKeckD2D commented on GitHub (Feb 15, 2025): It isn't you. It is me and the way I use ABS. I do not use ABS to listen to the RSS feeds created by ABS. I'm using Overcast, but other podcast players also show the newly added books as old because the RSS feed has the pubDate is set to Aug 2024, instead of when the book was added to the RSS feed. ABS is using the RSS standard pubDate in a way that is unexpected by other podcast players and stopping other podcast players from working as expected. Presumably it works fine in the ABS app, but I don't use or have that to check.
Author
Owner

@advplyr commented on GitHub (Feb 16, 2025):

It's using the createdAt timestamp of the earliest book added to the library.

Books, collections and series all use the same method for pubDate.

The date the book was added to the collection could be the same as other books if you are adding them in bulk to the collection. That would cause an issue with the ordering the podcast apps.

Also, if you re-order the collection then the pubDates wouldn't be in order.

@advplyr commented on GitHub (Feb 16, 2025): It's using the createdAt timestamp of the earliest book added to the library. Books, collections and series all use the same method for pubDate. The date the book was added to the collection could be the same as other books if you are adding them in bulk to the collection. That would cause an issue with the ordering the podcast apps. Also, if you re-order the collection then the pubDates wouldn't be in order.
Author
Owner

@GKeckD2D commented on GitHub (Feb 16, 2025):

So, if I wanted to add a new book to the collection/RSS feed when I finish the previous one, the newest book will always have an old date because it is based off the date the first book was added to the collection, +1 minute for each additional book?

@GKeckD2D commented on GitHub (Feb 16, 2025): So, if I wanted to add a new book to the collection/RSS feed when I finish the previous one, the newest book will always have an old date because it is based off the date the first book was added to the collection, +1 minute for each additional book?
Author
Owner

@advplyr commented on GitHub (Feb 16, 2025):

Correct

@advplyr commented on GitHub (Feb 16, 2025): Correct
Author
Owner

@GKeckD2D commented on GitHub (Feb 16, 2025):

Do you know what version that changed in? I'll roll back to that version and just hang out there :)

@GKeckD2D commented on GitHub (Feb 16, 2025): Do you know what version that changed in? I'll roll back to that version and just hang out there :)
Author
Owner

@advplyr commented on GitHub (Feb 17, 2025):

I believe it has always been like that. I'm not sure of another way to implement it

@advplyr commented on GitHub (Feb 17, 2025): I believe it has always been like that. I'm not sure of another way to implement it
Author
Owner

@GKeckD2D commented on GitHub (Feb 18, 2025):

Ok, thank you for your time!

@GKeckD2D commented on GitHub (Feb 18, 2025): Ok, thank you for your time!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2582