watch: Fix exception in to_valid_filename when video title is None

This commit is contained in:
James Taylor 2020-10-28 18:37:40 -07:00
parent 8abfe150f0
commit b91edee61c

View File

@ -400,7 +400,7 @@ def get_watch_page(video_id=None):
# Add video title to end of url path so it has a filename other than just
# "videoplayback" when downloaded
title = urllib.parse.quote(util.to_valid_filename(info['title']))
title = urllib.parse.quote(util.to_valid_filename(info['title'] or ''))
for fmt in info['formats']:
filename = title
ext = fmt.get('ext')