From b47793c365aaafee08db3cb4fe0b5a070029fb4f Mon Sep 17 00:00:00 2001 From: mikiher Date: Mon, 26 Feb 2024 14:00:25 +0200 Subject: [PATCH 1/2] Add cache control header for timestamped cover image requests --- server/controllers/LibraryItemController.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/controllers/LibraryItemController.js b/server/controllers/LibraryItemController.js index dfa1daea..3fa7743a 100644 --- a/server/controllers/LibraryItemController.js +++ b/server/controllers/LibraryItemController.js @@ -283,6 +283,9 @@ class LibraryItemController { return res.sendStatus(404) } + if (req.query.ts) + res.set('Cache-Control', 'private, max-age=86400') + if (raw) { // any value if (global.XAccel) { const encodedURI = encodeUriPath(global.XAccel + libraryItem.media.coverPath) From 4fe672f09d794c05d31a9375b2a686ed1c0dfe10 Mon Sep 17 00:00:00 2001 From: mikiher Date: Fri, 1 Mar 2024 11:55:53 +0200 Subject: [PATCH 2/2] Update cover image URLs with timestamp where available --- client/components/modals/item/tabs/Match.vue | 4 ++-- client/pages/library/_library/podcast/latest.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/components/modals/item/tabs/Match.vue b/client/components/modals/item/tabs/Match.vue index 7051a444..72aa7116 100644 --- a/client/components/modals/item/tabs/Match.vue +++ b/client/components/modals/item/tabs/Match.vue @@ -49,8 +49,8 @@

Current

- - + +
diff --git a/client/pages/library/_library/podcast/latest.vue b/client/pages/library/_library/podcast/latest.vue index 42f107c8..3fc47dfd 100644 --- a/client/pages/library/_library/podcast/latest.vue +++ b/client/pages/library/_library/podcast/latest.vue @@ -8,11 +8,11 @@

{{ $strings.MessageNoEpisodes }}