From 06fad6357b7cf8495bb0d4162919729d0375cf3d Mon Sep 17 00:00:00 2001 From: Dillon Pentz Date: Mon, 11 Mar 2024 15:36:45 +1100 Subject: [PATCH] fix: ensure local m3u8 files are in stable reversed order Co-authored-by: Mike Lang --- downloader/downloader/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/downloader/downloader/providers.py b/downloader/downloader/providers.py index 8d15022..994227c 100644 --- a/downloader/downloader/providers.py +++ b/downloader/downloader/providers.py @@ -214,7 +214,7 @@ class LocalProvider(Provider): files = os.listdir(self.directory) - for file in reversed(files): + for file in sorted(files, reverse=True): if file.endswith(".m3u8"): return {"source": os.path.join(self.directory, file)}