From 4243bb4bdf7c055a3f04edc2317e120864d8cf53 Mon Sep 17 00:00:00 2001 From: Ghost <62809003+Ghost6446@users.noreply.github.com> Date: Sun, 3 Mar 2024 12:29:13 +0100 Subject: [PATCH] fix dirname --- Src/Lib/FFmpeg/my_m3u8.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Src/Lib/FFmpeg/my_m3u8.py b/Src/Lib/FFmpeg/my_m3u8.py index e810d9a..40d46c1 100644 --- a/Src/Lib/FFmpeg/my_m3u8.py +++ b/Src/Lib/FFmpeg/my_m3u8.py @@ -459,7 +459,9 @@ def download_m3u8(m3u8_playlist=None, m3u8_index = None, m3u8_audio=None, m3u8_s # Download m3u8 index, with segments # os.makedirs("videos", exist_ok=True) - path = os.path.expanduser(output_filename) - os.makedirs("\\".join(path[:-1]), exist_ok=True) - if log: console.log(f"[green]Dowload m3u8 from index [white]=> [purple]{m3u8_index}") + path = os.path.dirname(output_filename) + os.makedirs(path, exist_ok=True) + + if log: + console.log(f"[green]Dowload m3u8 from index [white]=> [purple]{m3u8_index}") M3U8_Downloader(m3u8_index, m3u8_audio, key=key, output_filename=output_filename).start() \ No newline at end of file