diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-09-17 23:46:17 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-09-18 00:11:11 +0530 |
commit | f5aa5cfbffeea9352ace141707f35c86f5e11b89 (patch) | |
tree | 5e56f7bea9db56875e20d3641dc5c76b0ac4a507 /test/test_YoutubeDL.py | |
parent | f1f6ca78b439343aa3f8ef44f803befd682a3d37 (diff) | |
download | hypervideo-pre-f5aa5cfbffeea9352ace141707f35c86f5e11b89.tar.lz hypervideo-pre-f5aa5cfbffeea9352ace141707f35c86f5e11b89.tar.xz hypervideo-pre-f5aa5cfbffeea9352ace141707f35c86f5e11b89.zip |
Add format type `B` for outtmpl to treat the value as bytes
This is useful to limit the filename to a certain number of bytes rather than characters
Closes #1003
Diffstat (limited to 'test/test_YoutubeDL.py')
-rw-r--r-- | test/test_YoutubeDL.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index e689978fd..e61492ec8 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -649,6 +649,7 @@ class TestYoutubeDL(unittest.TestCase): 'title2': '%PATH%', 'title3': 'foo/bar\\test', 'title4': 'foo "bar" test', + 'title5': 'áéí', 'timestamp': 1618488000, 'duration': 100000, 'playlist_index': 1, @@ -767,6 +768,7 @@ class TestYoutubeDL(unittest.TestCase): test('%(ext)l', 'mp4') test('%(formats.:.id) 15l', ' id1, id2, id3') test('%(formats)j', (json.dumps(FORMATS), sanitize(json.dumps(FORMATS)))) + test('%(title5).3B', 'á') if compat_os_name == 'nt': test('%(title4)q', ('"foo \\"bar\\" test"', "'foo _'bar_' test'")) else: |