fix unavailable video crash
This commit is contained in:
parent
77c2202624
commit
5379207af6
|
@ -90,10 +90,8 @@ def download_video(args) -> dict:
|
||||||
output_dict['video_critical_err_msg_short'].append('unavailable.')
|
output_dict['video_critical_err_msg_short'].append('unavailable.')
|
||||||
return output_dict
|
return output_dict
|
||||||
|
|
||||||
# Clean the strings of forign languages
|
# Clean of forign languages
|
||||||
video['title'] = unidecode(video['title'])
|
video['title'] = unidecode(video['title'])
|
||||||
video['uploader'] = unidecode(video['uploader'])
|
|
||||||
|
|
||||||
# Get a bar
|
# Get a bar
|
||||||
locked = False
|
locked = False
|
||||||
if len(kwargs['bars']):
|
if len(kwargs['bars']):
|
||||||
|
@ -123,7 +121,7 @@ def download_video(args) -> dict:
|
||||||
|
|
||||||
# We created a new dict
|
# We created a new dict
|
||||||
video['title'] = unidecode(video['title'])
|
video['title'] = unidecode(video['title'])
|
||||||
video['uploader'] = unidecode(video['uploader'])
|
video['uploader'] = unidecode(video['uploader']) # now the additional info is present since we fetched it
|
||||||
|
|
||||||
video_filename = remove_special_chars_linux(ydl.get_output_templ(video_id=video['id'], title=video['title'], uploader=video['uploader'], uploader_id=video['uploader_id'], include_ext=False), special_chars=['/'])
|
video_filename = remove_special_chars_linux(ydl.get_output_templ(video_id=video['id'], title=video['title'], uploader=video['uploader'], uploader_id=video['uploader_id'], include_ext=False), special_chars=['/'])
|
||||||
|
|
||||||
|
|
Reference in New Issue