FIx error after a temp file ends up containing null.

This commit is contained in:
Relintai 2023-08-25 18:33:53 +02:00
parent 00470654f5
commit 21ad8d2ed2

View File

@ -743,9 +743,10 @@ class ChannelEntry:
with open(self.temp_data_file) as f: with open(self.temp_data_file) as f:
data = json.load(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: with YTDLNew(ydl_opts) as ydl:
data = ydl.extract_info(self.link, False) data = ydl.extract_info(self.link, False)