From 48406cea0395f14bb36b24d199ae747ac4e3171d Mon Sep 17 00:00:00 2001 From: Gerardo Zinno Date: Sun, 11 Oct 2026 18:35:48 +0200 Subject: [PATCH] Filter suffixes in list generator --- make_playlist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make_playlist.py b/make_playlist.py index 6bf6c5b..2f4a637 100755 --- a/make_playlist.py +++ b/make_playlist.py @@ -150,8 +150,8 @@ def main(): # pylint: disable=too-many-locals with open(base_dir / "playlist.m3u8", "w", encoding='utf-8') as playlist: playlist.write(head_playlist) - for filename in sorted(p.name for p in lists_dir.iterdir()): - if filename == "README.md" or not filename.endswith(".md"): + for filename in sorted(p.name for p in lists_dir.iterdir() if p.suffix == ".md"): + if filename == "README.md": continue markup_path = lists_dir / filename country_path = dir_playlists / f"playlist_{filename[:-3]}.m3u8"