audiodude / rainfall

Bandcamp exodus solution, letting you create personal artist sites using Faircamp
https://rainfall.dev
MIT License
12 stars 0 forks source link

Rename files with duplicate names #16

Closed audiodude closed 11 months ago

audiodude commented 11 months ago

Fixes #6.

The rename scheme is:

In order to properly handle filenames that actually have _\d+ as the last characters before the file extension, we add the original_filename field to the File object. The value doesn't really matter, if we find a file with an original_filename, we know it's already been renamed and we can infer how to do the renaming.