aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/YoutubeDL.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-01-12 09:00:21 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-01-12 09:00:21 +0530
commited8d87f911585060faf4df5295fa9ad5bf46c380 (patch)
treef56305dd821a2e9246ddbbe1e94e1736854e8589 /yt_dlp/YoutubeDL.py
parent397235c52bd9dc0e7f993e83b9301d981690c02f (diff)
[cleanup, docs] Minor fixes
Closes #2230
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r--yt_dlp/YoutubeDL.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index aa7905fc7..71369bc44 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -1637,7 +1637,7 @@ class YoutubeDL(object):
ie_entries = ie_result['entries']
if isinstance(ie_entries, list):
- playlist_count = len(ie_result)
+ playlist_count = len(ie_entries)
msg = f'Collected {playlist_count} videos; downloading %d of them'
ie_result['playlist_count'] = ie_result.get('playlist_count') or playlist_count
@@ -2392,15 +2392,15 @@ class YoutubeDL(object):
if not self.params.get('allow_unplayable_formats'):
formats = [f for f in formats if not f.get('has_drm')]
+ # backward compatibility
+ info_dict['fulltitle'] = info_dict['title']
+
if info_dict.get('is_live'):
get_from_start = bool(self.params.get('live_from_start'))
formats = [f for f in formats if bool(f.get('is_from_start')) == get_from_start]
if not get_from_start:
info_dict['title'] += ' ' + datetime.datetime.now().strftime('%Y-%m-%d %H:%M')
- # backward compatibility
- info_dict['fulltitle'] = info_dict['title']
-
if not formats:
self.raise_no_formats(info_dict)