From 1ccf24fe5f936ccdd3dacb72125408c1f33cecb8 Mon Sep 17 00:00:00 2001 From: dekzter Date: Sun, 27 Apr 2025 11:08:12 -0400 Subject: [PATCH] Fixed caching path for non-xc only --- apps/m3u/tasks.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/m3u/tasks.py b/apps/m3u/tasks.py index 978f9763..ce536234 100644 --- a/apps/m3u/tasks.py +++ b/apps/m3u/tasks.py @@ -420,14 +420,14 @@ def refresh_m3u_groups(account_id, use_cache=False, full_refresh=False): # Associate URL with the last EXTINF line extinf_data[-1]["url"] = line - send_m3u_update(account_id, "processing_groups", 0) + cache_path = os.path.join(m3u_dir, f"{account_id}.json") + with open(cache_path, 'w', encoding='utf-8') as f: + json.dump({ + "extinf_data": extinf_data, + "groups": groups, + }, f) - cache_path = os.path.join(m3u_dir, f"{account_id}.json") - with open(cache_path, 'w', encoding='utf-8') as f: - json.dump({ - "extinf_data": extinf_data, - "groups": groups, - }, f) + send_m3u_update(account_id, "processing_groups", 0) process_groups(account, groups)