From 20c8ff21792941259c3219956e1f92bf439d97b8 Mon Sep 17 00:00:00 2001 From: dekzter Date: Mon, 7 Apr 2025 12:20:46 -0400 Subject: [PATCH] file extension check for m3u and epg watcher --- core/tasks.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/tasks.py b/core/tasks.py index 62c20b3e..061dd1a5 100644 --- a/core/tasks.py +++ b/core/tasks.py @@ -43,6 +43,9 @@ def scan_and_process_files(): if not os.path.isfile(filepath): continue + if not filename.endswith('.m3u') and not filename.endswith('.m3u8'): + continue + mtime = os.path.getmtime(filepath) age = now - mtime redis_key = REDIS_PREFIX + filepath @@ -85,6 +88,9 @@ def scan_and_process_files(): if not os.path.isfile(filepath): continue + if not filename.endswith('.xml') and not filename.endswith('.gz'): + continue + mtime = os.path.getmtime(filepath) age = now - mtime redis_key = REDIS_PREFIX + filepath