mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 02:25:11 +00:00
[generic] Don't set the 'title' if it's not defined in the entry (closes #5061)
Some of them may be an 'url' result, which in general don't have the 'title' field.
This commit is contained in:
parent
37f885650c
commit
13d8fbef30
1 changed files with 3 additions and 1 deletions
|
@ -1208,6 +1208,8 @@ def filter_video(urls):
|
||||||
return entries[0]
|
return entries[0]
|
||||||
else:
|
else:
|
||||||
for num, e in enumerate(entries, start=1):
|
for num, e in enumerate(entries, start=1):
|
||||||
|
# 'url' results don't have a title
|
||||||
|
if e.get('title') is not None:
|
||||||
e['title'] = '%s (%d)' % (e['title'], num)
|
e['title'] = '%s (%d)' % (e['title'], num)
|
||||||
return {
|
return {
|
||||||
'_type': 'playlist',
|
'_type': 'playlist',
|
||||||
|
|
Loading…
Reference in a new issue