mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 10:45:27 +00:00
file extension check for m3u and epg watcher
This commit is contained in:
parent
5570562960
commit
20c8ff2179
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue