mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Using util for getPosterUrl
This commit is contained in:
parent
0ba22df233
commit
ffd8d9fe6b
1 changed files with 11 additions and 12 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue