file extension check for m3u and epg watcher

This commit is contained in:
dekzter 2025-04-07 12:20:46 -04:00
parent 5570562960
commit 20c8ff2179

View file

@ -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