mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-21 01:05:30 +00:00
disabled refresh button on inactive items, don't process them in inactive
This commit is contained in:
parent
348c471e26
commit
8bf75293fb
4 changed files with 10 additions and 0 deletions
|
|
@ -42,6 +42,10 @@ def refresh_epg_data(source_id):
|
|||
return
|
||||
|
||||
source = EPGSource.objects.get(id=source_id)
|
||||
if not source.is_active:
|
||||
logger.info(f"EPG source {source_id} is not active. Skipping.")
|
||||
return
|
||||
|
||||
logger.info(f"Processing EPGSource: {source.name} (type: {source.source_type})")
|
||||
if source.source_type == 'xmltv':
|
||||
fetch_xmltv(source)
|
||||
|
|
|
|||
|
|
@ -383,6 +383,10 @@ def refresh_single_m3u_account(account_id):
|
|||
|
||||
try:
|
||||
account = M3UAccount.objects.get(id=account_id, is_active=True)
|
||||
if not account.is_active:
|
||||
logger.info(f"Account {account_id} is not active, skipping.")
|
||||
return
|
||||
|
||||
filters = list(account.filters.all())
|
||||
except M3UAccount.DoesNotExist:
|
||||
release_task_lock('refresh_single_m3u_account', account_id)
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ const EPGsTable = () => {
|
|||
size="sm" // Makes the button smaller
|
||||
color="blue.5" // Red color for delete actions
|
||||
onClick={() => refreshEPG(row.original.id)}
|
||||
disabled={!row.original.is_active}
|
||||
>
|
||||
<RefreshCcw size="18" /> {/* Small icon size */}
|
||||
</ActionIcon>
|
||||
|
|
|
|||
|
|
@ -263,6 +263,7 @@ const M3UTable = () => {
|
|||
size="sm"
|
||||
color="blue.5"
|
||||
onClick={() => refreshPlaylist(row.original.id)}
|
||||
disabled={!row.original.is_active}
|
||||
>
|
||||
<RefreshCcw size="18" />
|
||||
</ActionIcon>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue