Files
yt-dlp/yt_dlp
Teika Kazura 4f46e5a323 YoutubeDL.py: Defines a new function validate_destination_filename(), which checks the filename length limit before downloading.
This closes issue #8908 """yt-dlp should abort on first "File name too long" error""".

Currenty the test fails at test/test_YoutubeDL.py:819. The message is:
-------------------------------------------------------------------------
TestYoutubeDL::test_prepare_outtmpl_and_filename - OSError: [Errno 36] File name too long: '{"id
": "1234", "ext": "mp4", "width": null,...
-------------------------------------------------------------------------
And the tried filename is:
------------------------------------------------------------------------
'{"id": "1234", "ext": "mp4", "width": null, "height": 1080, "filesize": 1024, "title1": "$PATH", "title2": "%PATH%", "title3": "foo⧸bar⧹⧹test", "title4": "foo ⧹"ba⧹" test", "title5": "⧹u00e1⧹u00e9⧹u00ed ⧹ud835⧹udc00", "timestamp": 1618488000, "duration: 100000, "playlist_index": 1, "playlist_autonumber": 2, "__last_playlist_index": 100, "n_entries": 10, "formats": [{"id": "id 1", "height": 1080, "width": 1920}, {"id": "id2", "height": 720}, {"id": "id 3"}], "epoch": 1740284668, "duration_string": "27-46-40", "autonumber": 1, "video_autonumber": 0, "resolution": "1080p"}'
------------------------------------------------------------------------
2025-02-23 14:00:33 +09:00
..
2024-09-27 22:46:22 +00:00
2024-03-11 00:48:47 +05:30
2024-12-02 16:29:30 +01:00
2025-02-19 02:42:18 +00:00