From 21ad8d2ed25c77440644cad5bcbe60322a553274 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 25 Aug 2023 18:33:53 +0200 Subject: [PATCH] FIx error after a temp file ends up containing null. --- ytdl_link_gen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ytdl_link_gen.py b/ytdl_link_gen.py index fcf92ba..ca0576b 100644 --- a/ytdl_link_gen.py +++ b/ytdl_link_gen.py @@ -743,9 +743,10 @@ class ChannelEntry: with open(self.temp_data_file) as f: data = json.load(f) - self.was_cached = True + if not data is None: + self.was_cached = True - return data + return data with YTDLNew(ydl_opts) as ydl: data = ydl.extract_info(self.link, False)