From 7ce51745a0683442b27f38b88ffab624210c04fc Mon Sep 17 00:00:00 2001 From: Lovi-0 Date: Sun, 7 Jul 2024 16:05:34 +0200 Subject: [PATCH] Fix m3u8 dict to second --- Src/Lib/Downloader/HLS/downloader.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Src/Lib/Downloader/HLS/downloader.py b/Src/Lib/Downloader/HLS/downloader.py index 9d8009b..176a4a4 100644 --- a/Src/Lib/Downloader/HLS/downloader.py +++ b/Src/Lib/Downloader/HLS/downloader.py @@ -472,9 +472,11 @@ class HLS_Downloader(): """ def dict_to_seconds(d): - return d['h'] * 3600 + d['m'] * 60 + d['s'] + if d != None: + return d['h'] * 3600 + d['m'] * 60 + d['s'] + else: + 1 # Default false - # Check if file to rename exist logging.info(f"Check if end file converted exist: {out_path}") if out_path is None or not os.path.isfile(out_path):