From: Sergey M․ Date: Wed, 9 Mar 2016 19:03:18 +0000 (+0600) Subject: [YoutubeDL] Improve _format_note X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=5d583bdf6cff8161e2df87ba1a0c97a943596eab;p=youtube-dl [YoutubeDL] Improve _format_note --- diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 59f7ab49d..bf78b005f 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -502,6 +502,10 @@ class TestYoutubeDL(unittest.TestCase): assertRegexpMatches(self, ydl._format_note({ 'vbr': 10, }), '^\s*10k$') + assertRegexpMatches(self, ydl._format_note({ + 'fps': 30, + }), '^30fps$') + def test_postprocessors(self): filename = 'post-processor-testfile.mp4' diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 2dfdea032..b3391088f 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1856,7 +1856,9 @@ class YoutubeDL(object): if fdict.get('vbr') is not None: res += '%4dk' % fdict['vbr'] if fdict.get('fps') is not None: - res += ', %sfps' % fdict['fps'] + if res: + res += ', ' + res += '%sfps' % fdict['fps'] if fdict.get('acodec') is not None: if res: res += ', '