[youtube] End live-from-start properly when stream ends with 403
Closes #2089
This commit is contained in:
parent
0b77924a38
commit
185bf31070
2 changed files with 27 additions and 18 deletions
|
|
@ -433,6 +433,7 @@ class FragmentFD(FileDownloader):
|
|||
|
||||
def download_fragment(fragment, ctx):
|
||||
frag_index = ctx['fragment_index'] = fragment['frag_index']
|
||||
ctx['last_error'] = None
|
||||
if not interrupt_trigger[0]:
|
||||
return False, frag_index
|
||||
headers = info_dict.get('http_headers', {}).copy()
|
||||
|
|
@ -455,6 +456,7 @@ class FragmentFD(FileDownloader):
|
|||
# See https://github.com/ytdl-org/youtube-dl/issues/10165,
|
||||
# https://github.com/ytdl-org/youtube-dl/issues/10448).
|
||||
count += 1
|
||||
ctx['last_error'] = err
|
||||
if count <= fragment_retries:
|
||||
self.report_retry_fragment(err, frag_index, count, fragment_retries)
|
||||
except DownloadError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue