mirror of
https://github.com/Free-TV/IPTV.git
synced 2026-10-23 00:04:59 +02:00
Filter suffixes in list generator
This commit is contained in:
+2
-2
@@ -150,8 +150,8 @@ def main(): # pylint: disable=too-many-locals
|
|||||||
|
|
||||||
with open(base_dir / "playlist.m3u8", "w", encoding='utf-8') as playlist:
|
with open(base_dir / "playlist.m3u8", "w", encoding='utf-8') as playlist:
|
||||||
playlist.write(head_playlist)
|
playlist.write(head_playlist)
|
||||||
for filename in sorted(p.name for p in lists_dir.iterdir()):
|
for filename in sorted(p.name for p in lists_dir.iterdir() if p.suffix == ".md"):
|
||||||
if filename == "README.md" or not filename.endswith(".md"):
|
if filename == "README.md":
|
||||||
continue
|
continue
|
||||||
markup_path = lists_dir / filename
|
markup_path = lists_dir / filename
|
||||||
country_path = dir_playlists / f"playlist_{filename[:-3]}.m3u8"
|
country_path = dir_playlists / f"playlist_{filename[:-3]}.m3u8"
|
||||||
|
|||||||
Reference in New Issue
Block a user