meeb / bandcampsync

Downloads your Bandcamp purchases automatically
BSD 3-Clause "New" or "Revised" License
156 stars 9 forks source link

"file too long" fatal issue on macos #10

Closed navicore closed 1 year ago

navicore commented 1 year ago

In my collection I have an artist/album that can't download to mac. This causes the bandcampsync process to halt.

Bandcamp does not support deleting catalog entries.

The entry is Waveform Magazine issue 3 creates a crazy file resulting is:

OSError: [Errno 63] File name too long: '/Users/navicore/Music/Bandcamp/media/Waveform Magazine/WAVEFORM MAGAZINE ISSUE 3 COMPILATION---Yes, Bandcamp says you can pay for this album, and even name your own price! Please dont. Instead, when a track hits you a certain way, please go to that artists websiteBandcamp page and show them your love and support. Thanks!'

I got past it adding support for a --bypass arg so I could "--bypass waveform" https://github.com/navicore/bandcampsync/blob/48ea82f1d0b8125cf4c4414b53bcd0df53a4c1d2/bandcampsync/__init__.py#L16

I held off on a PR because maybe this shouldn't be a fatal error... just log and continue? I could take a crack at that for a PR if desired.

meeb commented 1 year ago

That is indeed an annoying track name! Feel free to make this a PR, if you could name it --ignore and add it to the README I'd merge it into the next release.

Is exception is being thrown by mkdir? If so I may catch that and log an error instead.

Thanks for the issue.

meeb commented 1 year ago

You happy to close this now the PR is merged?

navicore commented 1 year ago

see merged PR for solution