diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-01-02 03:03:26 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-01-02 03:03:26 +0530 |
commit | 4c922dd3fc9ed91057414e28140e0bc3bfe04326 (patch) | |
tree | c6597d38bbfeb39fc22c727326f4caa35ce8b375 | |
parent | b8e976a44515b7a64f4f6d904025dffe742e21fa (diff) | |
download | hypervideo-pre-4c922dd3fc9ed91057414e28140e0bc3bfe04326.tar.lz hypervideo-pre-4c922dd3fc9ed91057414e28140e0bc3bfe04326.tar.xz hypervideo-pre-4c922dd3fc9ed91057414e28140e0bc3bfe04326.zip |
Fix live title for multiple formats
-rw-r--r-- | yt_dlp/YoutubeDL.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 9cec43680..9ab8d7f08 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2375,6 +2375,8 @@ class YoutubeDL(object): 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') if not formats: self.raise_no_formats(info_dict) @@ -2712,9 +2714,6 @@ class YoutubeDL(object): if self._num_downloads >= int(max_downloads): raise MaxDownloadsReached() - if info_dict.get('is_live') and not self.params.get('live_from_start'): - info_dict['title'] += ' ' + datetime.datetime.now().strftime('%Y-%m-%d %H:%M') - # TODO: backward compatibility, to be removed info_dict['fulltitle'] = info_dict['title'] |