From ffd8d9fe6b0ad091355f7ac9434778f55b0c117b Mon Sep 17 00:00:00 2001 From: Nick Sandstrom <32273437+nick4810@users.noreply.github.com> Date: Tue, 16 Dec 2025 11:53:45 -0800 Subject: [PATCH] Using util for getPosterUrl --- frontend/src/pages/DVR.jsx | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/frontend/src/pages/DVR.jsx b/frontend/src/pages/DVR.jsx index 1f3b98f5..023457e3 100644 --- a/frontend/src/pages/DVR.jsx +++ b/frontend/src/pages/DVR.jsx @@ -24,6 +24,7 @@ import { RecordingDetailsModal } from '../components/forms/RecordingDetailsModal import { RecurringRuleModal } from '../components/forms/RecurringRuleModal.jsx'; import { RecordingCard } from '../components/cards/RecordingCard.jsx'; import { categorizeRecordings } from '../utils/pages/DVRUtils.js'; +import { getPosterUrl } from '../utils/cards/RecordingCardUtils.js'; const DVRPage = () => { const theme = useMantineTheme(); @@ -136,11 +137,11 @@ const DVRPage = () => { detailsRecording.custom_properties?.program?.title || 'Recording', logo: { - url: - (detailsRecording.custom_properties?.poster_logo_id - ? `/api/channels/logos/${detailsRecording.custom_properties.poster_logo_id}/cache/` - : channels[detailsRecording.channel]?.logo?.cache_url) || - '/logo.png', + url: getPosterUrl( + detailsRecording.custom_properties?.poster_logo_id, + undefined, + channels[detailsRecording.channel]?.logo?.cache_url + ) }, }); } @@ -257,13 +258,11 @@ const DVRPage = () => { onClose={closeDetails} recording={detailsRecording} channel={channels[detailsRecording.channel]} - posterUrl={ - (detailsRecording.custom_properties?.poster_logo_id - ? `/api/channels/logos/${detailsRecording.custom_properties.poster_logo_id}/cache/` - : detailsRecording.custom_properties?.poster_url || - channels[detailsRecording.channel]?.logo?.cache_url) || - '/logo.png' - } + posterUrl={getPosterUrl( + detailsRecording.custom_properties?.poster_logo_id, + detailsRecording.custom_properties, + channels[detailsRecording.channel]?.logo?.cache_url + )} env_mode={useSettingsStore.getState().environment.env_mode} onWatchLive={handleOnWatchLive} onWatchRecording={handleOnWatchRecording}