diff --git a/frontend/src/components/ProgramDetailModal.jsx b/frontend/src/components/ProgramDetailModal.jsx index 129a5505..32cae1b3 100644 --- a/frontend/src/components/ProgramDetailModal.jsx +++ b/frontend/src/components/ProgramDetailModal.jsx @@ -15,17 +15,11 @@ import { Calendar, Video } from 'lucide-react'; import API from '../api'; import useVideoStore from '../store/useVideoStore'; import useSettingsStore from '../store/settings'; -import { getShowVideoUrl, getChannelLogoUrl } from '../utils/cards/RecordingCardUtils'; +import { getShowVideoUrl } from '../utils/cards/RecordingCardUtils'; import { formatSeasonEpisode } from '../pages/guideUtils'; import { format, initializeTime, diff, useDateTimeFormat } from '../utils/dateTimeUtils'; import { imdbUrl, tmdbUrl } from '../utils/externalUrls'; -const modalStyles = { - content: { backgroundColor: '#18181B', color: 'white' }, - header: { backgroundColor: '#18181B', color: 'white' }, - title: { color: 'white' }, -}; - const overlayProps = { color: '#000', backgroundOpacity: 0.55, blur: 0 }; function formatDurationMinutes(startTime, endTime) { @@ -136,7 +130,6 @@ export default function ProgramDetailModal({ const starRatings = d.star_ratings || []; const description = d.description || program.description; const subtitle = d.sub_title ?? program.sub_title; - const channelLogoUrl = getChannelLogoUrl(channel); const posterUrl = resolveImageUrl(d); const duration = formatDurationMinutes(program.start_time, program.end_time); const programStart = initializeTime(program.start_time || program.startMs); @@ -146,11 +139,17 @@ export default function ProgramDetailModal({ + {channel.channel_number ? `${channel.channel_number} - ` : ''} + {channel.name} + + ) : null + } size="lg" centered overlayProps={overlayProps} - styles={modalStyles} zIndex={9999} > @@ -227,15 +226,6 @@ export default function ProgramDetailModal({ )} - {channel && ( - - {channel.channel_number - ? `${channel.channel_number} - ` - : ''} - {channel.name} - - )} - {format(programStart, timeFormat)} –{' '} @@ -402,23 +392,6 @@ export default function ProgramDetailModal({ )} )} - {channelLogoUrl && ( - - - - )} ); diff --git a/frontend/src/pages/Guide.jsx b/frontend/src/pages/Guide.jsx index 21216821..81171637 100644 --- a/frontend/src/pages/Guide.jsx +++ b/frontend/src/pages/Guide.jsx @@ -775,11 +775,10 @@ export default function TVChannelGuide({ startDate, endDate }) { ); const handleProgramClick = useCallback( - (program, event) => { + (program, channel, event) => { event.stopPropagation(); - const matched = findChannelByTvgId(program.tvg_id); setSelectedProgram(program); - setSelectedChannel(matched); + setSelectedChannel(channel || findChannelByTvgId(program.tvg_id)); setRecordingForProgram(recordingsByProgramId.get(program.id) || null); }, [findChannelByTvgId, recordingsByProgramId] @@ -895,7 +894,7 @@ export default function TVChannelGuide({ startDate, endDate }) { top={0} w={widthPx} h={PROGRAM_HEIGHT - 4} - onClick={(event) => handleProgramClick(program, event)} + onClick={(event) => handleProgramClick(program, channel, event)} >