From a846b09ad3ad29d641a541be2c84b5295fb64cf5 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Tue, 16 Sep 2025 14:39:04 -0500 Subject: [PATCH] Minor formatting adjustment. --- apps/channels/api_views.py | 4 ++-- apps/channels/tasks.py | 2 +- frontend/src/api.js | 2 +- .../components/tables/ChannelsTable/ChannelTableHeader.jsx | 7 +++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/apps/channels/api_views.py b/apps/channels/api_views.py index 4e3851b7..c1f7034e 100644 --- a/apps/channels/api_views.py +++ b/apps/channels/api_views.py @@ -796,7 +796,7 @@ class ChannelViewSet(viewsets.ModelViewSet): def match_epg(self, request): # Get channel IDs from request body if provided channel_ids = request.data.get('channel_ids', []) - + if channel_ids: # Process only selected channels from .tasks import match_selected_channels_epg @@ -806,7 +806,7 @@ class ChannelViewSet(viewsets.ModelViewSet): # Process all channels without EPG (original behavior) match_epg_channels.delay() message = "EPG matching task initiated for all channels without EPG." - + return Response( {"message": message}, status=status.HTTP_202_ACCEPTED ) diff --git a/apps/channels/tasks.py b/apps/channels/tasks.py index 6352ee84..c1e63658 100755 --- a/apps/channels/tasks.py +++ b/apps/channels/tasks.py @@ -551,7 +551,7 @@ def match_selected_channels_epg(channel_ids): if not channels_without_epg.exists(): logger.info("No selected channels need EPG matching.") - + # Send WebSocket update channel_layer = get_channel_layer() async_to_sync(channel_layer.group_send)( diff --git a/frontend/src/api.js b/frontend/src/api.js index 09f8c3c1..a1c761c6 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -1440,7 +1440,7 @@ export default class API { static async matchEpg(channelIds = null) { try { const requestBody = channelIds ? { channel_ids: channelIds } : {}; - + const response = await request( `${host}/api/channels/channels/match-epg/`, { diff --git a/frontend/src/components/tables/ChannelsTable/ChannelTableHeader.jsx b/frontend/src/components/tables/ChannelsTable/ChannelTableHeader.jsx index e9f5172d..b7e04d7d 100644 --- a/frontend/src/components/tables/ChannelsTable/ChannelTableHeader.jsx +++ b/frontend/src/components/tables/ChannelsTable/ChannelTableHeader.jsx @@ -306,10 +306,9 @@ const ChannelTableHeader = ({ onClick={matchEpg} > - {selectedTableIds.length > 0 - ? `Auto-Match (${selectedTableIds.length} selected)` - : 'Auto-Match EPG' - } + {selectedTableIds.length > 0 + ? `Auto-Match (${selectedTableIds.length} selected)` + : 'Auto-Match EPG'}