diff --git a/frontend/src/pages/Guide.jsx b/frontend/src/pages/Guide.jsx index e21dca32..7671fb57 100644 --- a/frontend/src/pages/Guide.jsx +++ b/frontend/src/pages/Guide.jsx @@ -23,6 +23,7 @@ import { Transition, Modal, Stack, + useMantineTheme, } from '@mantine/core'; import { Search, X, Clock, Video, Calendar, Play } from 'lucide-react'; import './guide.css'; @@ -38,6 +39,7 @@ const MINUTE_INCREMENT = 15; // For positioning programs every 15 min const MINUTE_BLOCK_WIDTH = HOUR_WIDTH / (60 / MINUTE_INCREMENT); export default function TVChannelGuide({ startDate, endDate }) { + const theme = useMantineTheme(); const channels = useChannelsStore((s) => s.channels); const recordings = useChannelsStore((s) => s.recordings); const channelGroups = useChannelsStore((s) => s.channelGroups); @@ -294,7 +296,10 @@ export default function TVChannelGuide({ startDate, endDate }) { setRecordChoiceOpen(true); try { const rules = await API.listSeriesRules(); - const rule = (rules || []).find((r) => String(r.tvg_id) === String(program.tvg_id)); + // Only treat as existing if the rule matches this specific show's title (or has no title constraint) + const rule = (rules || []).find( + (r) => String(r.tvg_id) === String(program.tvg_id) && (!r.title || r.title === program.title) + ); setExistingRuleMode(rule ? rule.mode : null); } catch {} // Also detect if this program already has a scheduled recording @@ -922,12 +927,18 @@ export default function TVChannelGuide({ startDate, endDate }) { )} - - {filteredChannels.length}{' '} @@ -1366,7 +1377,7 @@ export default function TVChannelGuide({ startDate, endDate }) { overlayProps={{ color: '#000', backgroundOpacity: 0.55, blur: 0 }} styles={{ content: { backgroundColor: '#18181B', color: 'white' }, - header: { backgroundColor: '#18181B', color: 'white', borderBottom: '1px solid #27272A' }, + header: { backgroundColor: '#18181B', color: 'white' }, title: { color: 'white' }, }} > @@ -1384,8 +1395,9 @@ export default function TVChannelGuide({ startDate, endDate }) { @@ -1409,7 +1421,7 @@ export default function TVChannelGuide({ startDate, endDate }) { overlayProps={{ color: '#000', backgroundOpacity: 0.55, blur: 0 }} styles={{ content: { backgroundColor: '#18181B', color: 'white' }, - header: { backgroundColor: '#18181B', color: 'white', borderBottom: '1px solid #27272A' }, + header: { backgroundColor: '#18181B', color: 'white' }, title: { color: 'white' }, }} > @@ -1428,18 +1440,11 @@ export default function TVChannelGuide({ startDate, endDate }) { }}>Evaluate Now - - + }}>Remove this series (scheduled) ))}