mirror of
https://github.com/alexta69/metube.git
synced 2025-04-04 12:47:38 +03:00
report date time correctly.
This commit is contained in:
parent
10ce7462fa
commit
9552fb3ca0
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,7 @@ import multiprocessing
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from dl_formats import get_format, get_opts, AUDIO_FORMATS
|
from dl_formats import get_format, get_opts, AUDIO_FORMATS
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
log = logging.getLogger('ytdl')
|
log = logging.getLogger('ytdl')
|
||||||
|
|
||||||
|
@ -251,7 +252,8 @@ class DownloadQueue:
|
||||||
|
|
||||||
error = None
|
error = 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":
|
||||||
error = f"Live stream is scheduled to start at {time.strftime('%Y-%m-%d %H:%M:%S %Z', time.localtime(entry.get('release_timestamp')))}"
|
dt_ts = datetime.fromtimestamp(entry.get("release_timestamp")).strftime('%Y-%m-%d %H:%M:%S %z')
|
||||||
|
error = f"Live stream is scheduled to start at {dt_ts}"
|
||||||
else:
|
else:
|
||||||
if "msg" in entry:
|
if "msg" in entry:
|
||||||
error = entry["msg"]
|
error = entry["msg"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue