reverted changes to break_on_existing as it breaks channels/playlist importing.
This commit is contained in:
parent
1c38a60488
commit
846cc5256a
2 changed files with 10 additions and 10 deletions
|
|
@ -54,14 +54,6 @@ class DownloadQueue:
|
||||||
error: str = None
|
error: str = None
|
||||||
live_in: str = None
|
live_in: str = None
|
||||||
|
|
||||||
if 'live_status' in entry and entry.get('live_status') == 'is_upcoming':
|
|
||||||
if 'release_timestamp' in entry and entry.get('release_timestamp'):
|
|
||||||
live_in = formatdate(entry.get('release_timestamp'))
|
|
||||||
else:
|
|
||||||
error = 'Live stream not yet started. And no date is set.'
|
|
||||||
else:
|
|
||||||
error = entry.get('msg', None)
|
|
||||||
|
|
||||||
etype = entry.get('_type') or 'video'
|
etype = entry.get('_type') or 'video'
|
||||||
if etype == 'playlist':
|
if etype == 'playlist':
|
||||||
entries = entry['entries']
|
entries = entry['entries']
|
||||||
|
|
@ -94,6 +86,15 @@ class DownloadQueue:
|
||||||
|
|
||||||
return {'status': 'ok'}
|
return {'status': 'ok'}
|
||||||
elif (etype == 'video' or etype.startswith('url')) and 'id' in entry and 'title' in entry:
|
elif (etype == 'video' or etype.startswith('url')) and 'id' in entry and 'title' in entry:
|
||||||
|
# check if the video is live stream.
|
||||||
|
if 'live_status' in entry and entry.get('live_status') == 'is_upcoming':
|
||||||
|
if 'release_timestamp' in entry and entry.get('release_timestamp'):
|
||||||
|
live_in = formatdate(entry.get('release_timestamp'))
|
||||||
|
else:
|
||||||
|
error = 'Live stream not yet started. And no date is set.'
|
||||||
|
else:
|
||||||
|
error = entry.get('msg', None)
|
||||||
|
|
||||||
log.debug(
|
log.debug(
|
||||||
f"entry: {entry.get('id', None)} - {entry.get('webpage_url', None)} - {entry.get('url', None) }")
|
f"entry: {entry.get('id', None)} - {entry.get('webpage_url', None)} - {entry.get('url', None) }")
|
||||||
|
|
||||||
|
|
@ -149,7 +150,7 @@ class DownloadQueue:
|
||||||
output_template_chapter=output_chapter,
|
output_template_chapter=output_chapter,
|
||||||
default_ytdl_opts=self.config.ytdl_options,
|
default_ytdl_opts=self.config.ytdl_options,
|
||||||
debug=bool(self.config.ytdl_debug)
|
debug=bool(self.config.ytdl_debug)
|
||||||
);
|
)
|
||||||
|
|
||||||
if dlInfo.info.live_in:
|
if dlInfo.info.live_in:
|
||||||
dlInfo.info.status = 'not_live'
|
dlInfo.info.status = 'not_live'
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,6 @@ def ExtractInfo(config: dict, url: str, debug: bool = False) -> dict:
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
'ignoreerrors': True,
|
'ignoreerrors': True,
|
||||||
'ignore_no_formats_error': True,
|
'ignore_no_formats_error': True,
|
||||||
'break_on_existing': True,
|
|
||||||
**config,
|
**config,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue