From 94400acdcd348d41f0ef9948795c23ec63aa2ac9 Mon Sep 17 00:00:00 2001 From: zsh Date: Fri, 31 Jul 2026 10:16:23 +1200 Subject: [PATCH] fix: add cache-busting timestamp to RSS feed cover image URLs Feed cover image URLs were built only from the item's slug and file extension, so the URL never changed when the cover image itself changed. Podcast clients that cache by URL would keep showing the old cover after an update. Add a '?ts=' query parameter using the already-computed entityUpdatedAt value, matching the same cache-busting convention already used elsewhere in the app (see the updatedAt comment in LibraryItemController.updateCover). Applies to all three feed types: single item, collection, and series. Fixes #5306 --- server/models/Feed.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/models/Feed.js b/server/models/Feed.js index 577dedfb9..a433d0b1a 100644 --- a/server/models/Feed.js +++ b/server/models/Feed.js @@ -119,7 +119,7 @@ class Feed extends Model { entityUpdatedAt, serverAddress, feedURL: `/feed/${slug}`, - imageURL: media.coverPath ? `/feed/${slug}/cover${Path.extname(media.coverPath)}` : `/Logo.png`, + imageURL: media.coverPath ? `/feed/${slug}/cover${Path.extname(media.coverPath)}?ts=${new Date(entityUpdatedAt).getTime()}` : `/Logo.png`, siteURL: `/item/${libraryItem.id}`, title: media.title, description: media.description, @@ -212,7 +212,7 @@ class Feed extends Model { entityUpdatedAt, serverAddress, feedURL: `/feed/${slug}`, - imageURL: firstBookWithCover?.coverPath ? `/feed/${slug}/cover${Path.extname(firstBookWithCover.coverPath)}` : `/Logo.png`, + imageURL: firstBookWithCover?.coverPath ? `/feed/${slug}/cover${Path.extname(firstBookWithCover.coverPath)}?ts=${new Date(entityUpdatedAt).getTime()}` : `/Logo.png`, siteURL: `/collection/${collectionExpanded.id}`, title: collectionExpanded.name, description: collectionExpanded.description || '', @@ -301,7 +301,7 @@ class Feed extends Model { entityUpdatedAt, serverAddress, feedURL: `/feed/${slug}`, - imageURL: firstBookWithCover?.coverPath ? `/feed/${slug}/cover${Path.extname(firstBookWithCover.coverPath)}` : `/Logo.png`, + imageURL: firstBookWithCover?.coverPath ? `/feed/${slug}/cover${Path.extname(firstBookWithCover.coverPath)}?ts=${new Date(entityUpdatedAt).getTime()}` : `/Logo.png`, siteURL: `/library/${booksWithTracks[0].libraryItem.libraryId}/series/${seriesExpanded.id}`, title: seriesExpanded.name, description: seriesExpanded.description || '',