easlice / bandcamp-downloader

Download your bandcamp collection using this python script.
MIT License
281 stars 34 forks source link

Fix names with slashes in them #22

Closed octylFractal closed 9 months ago

octylFractal commented 9 months ago

Backslashes are also replaced for windows

It may also be nice to offer an option to do the windows replacements on all platforms, to make files more cross-platform safe. I didn't do this to keep the changeset small.

For an example of what this fixes, https://lenichkirya.bandcamp.com/track/asgore-w-bergentr-ckung used to create an extra directory named 'Asgore (w' and then a file named ' Bergentr​ü​ckung).flac'. Now it creates 'Asgore (w- Bergentr​ü​ckung).flac'

easlice commented 9 months ago

Hey, thanks for the patch!

Yeah, looking at it the lack of sanitization on fields for potential path problems (windows or non-windows) is a problem. As is platform inconsistency. This patch is a good start on that.

Thanks again, effort is always appreciated.