Merge pull request #38 from ArabCoders/dev

sometimes release_timestamp is null
This commit is contained in:
Abdulmohsen 2023-12-03 00:26:11 +03:00 committed by GitHub
commit d9caf6f671
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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}"