occivink / mpv-scripts

Various scripts for mpv
The Unlicense
417 stars 38 forks source link

Avoid NTFS invalid characters #37

Closed AeliusSaionji closed 4 years ago

AeliusSaionji commented 4 years ago

Hey, sorry to bug you about Windows specific issues again, but this one has been a thorn in my side for a while now.

Youtube urls can come in two flavors: https://www.youtube.com/watch?v=XXXXX yout.ube/XXXXX

The first one will cause any encodings to fail on Windows because the filename contains a question mark. I would really appreciate it if we could sanitize output filenames, so I could cut out segments of streams without having to modify the url (or more likely just download the video to make sure it works).

Thanks!

occivink commented 4 years ago

Yeah makes sense. I'm not sure why I didn't cover all characters in that commit 2b635f299ea3f99e1704d1f30c27d0665b0eff82

AeliusSaionji commented 4 years ago

ah nice! Probably not all of these need to be handled, but the basic list of characters that don't work is / ? < > \ : * | "

occivink commented 4 years ago

Should be fixed in 8e282861c3871d9437a1b331fc9be57052a2908d