mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-07-22 09:27:11 +00:00
[utils] parse_resolution: Support fps suffixes (#17073)
Authored by: doe1080
This commit is contained in:
@@ -1405,7 +1405,11 @@ class TestUtil(unittest.TestCase):
|
||||
self.assertEqual(parse_resolution('1920×1080 '), {'width': 1920, 'height': 1080})
|
||||
self.assertEqual(parse_resolution('1920 x 1080'), {'width': 1920, 'height': 1080})
|
||||
self.assertEqual(parse_resolution('720p'), {'height': 720})
|
||||
self.assertEqual(parse_resolution('1080p60'), {'height': 1080})
|
||||
self.assertEqual(parse_resolution('1080p120', parse_fps=True), {'height': 1080, 'fps': 120})
|
||||
self.assertEqual(parse_resolution('4k'), {'height': 2160})
|
||||
self.assertEqual(parse_resolution('4K60'), {'height': 2160})
|
||||
self.assertEqual(parse_resolution('4K120', parse_fps=True), {'height': 2160, 'fps': 120})
|
||||
self.assertEqual(parse_resolution('8K'), {'height': 4320})
|
||||
self.assertEqual(parse_resolution('pre_1920x1080_post'), {'width': 1920, 'height': 1080})
|
||||
self.assertEqual(parse_resolution('ep1x2'), {})
|
||||
|
||||
Reference in New Issue
Block a user