Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feed episode IDs changing on refresh & several other refresh issues #3772

Merged
merged 2 commits into from
Jan 1, 2025

Conversation

advplyr
Copy link
Owner

@advplyr advplyr commented Jan 1, 2025

Brief summary

Feed episodes were dropping and re-creating the table record anytime a feed needed to be updated. Since the generated RSS feed uses the content url as the GUID this was changing on every update causing podcast clients to think it is a new episode.

Which issue is fixed?

#3757

In-depth Description

To fix this the existing FeedEpisode records are loaded and the filePath is compared to see if a FeedEpisode should be updated. So if the filepath changes then the generated RSS feed guid will change.
Another option could be using the inode value but this would require storing the inode value in the FeedEpisode model and would cause issues for users using a file system that doesn't support unique inode values.

This fixes 3 other issues that I found while testing.

  1. For audiobook feeds. When book chapters are updated the Book.updatedAt timestamp changes but the LibraryItem.updatedAt timestamp does not. So changing book chapters wasn't causing a refresh of the feed. To fix this I add an additional check to see if the Book.updatedAt is more recent than the LibraryItem.updatedAt and use that as the Feed.entityUpdatedAt if so.
  2. For podcast feeds. The check was using the most recent PodcastEpisode.createdAt instead of PodcastEpisode.updatedAt. So updating a podcast episode wasn't refreshing the feed.
  3. For collection & series feeds. When removing a book from the library that belonged to the series or collection the feed would not refresh since it is checking the most recent updatedAt timestamp of the available books. To fix this I added a check to see if the total number of audio tracks has changed.

How have you tested this?

Opened a feed for a podcast, an audiobook, a collection and a series. Tested adding/removing/updating the entity and child entities.

@advplyr advplyr merged commit c8a0592 into master Jan 1, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant