sometimes release_timestamp is null

This commit is contained in:
ArabCoders 2023-12-03 00:09:02 +03:00
parent 679b95a7e9
commit 3b8fe14200

View file

@ -56,7 +56,7 @@ class DownloadQueue:
error: str = None
live_in: str = None
if 'live_status' in entry and 'release_timestamp' in entry and entry.get('live_status') == 'is_upcoming':
if 'live_status' in entry and 'release_timestamp' in entry and entry.get('live_status') == 'is_upcoming' and entry.get('release_timestamp'):
dt_ts = datetime.fromtimestamp(
entry.get('release_timestamp'), tz=timezone.utc).strftime('%Y-%m-%d %H:%M:%S %z')
error = f"Live stream is scheduled to start at {dt_ts}"