garcia / simfile

A modern simfile parsing & editing library for Python 3
MIT License
62 stars 7 forks source link

add ignore_duplicate flag for SimfileDirectory and SimfilePack classes #42

Closed lucdar closed 1 year ago

lucdar commented 1 year ago

Suppresses the DuplicateSimfileError when creating a SimfileDirectory, and uses the first .sm/.ssc file found which is dependent on the ordering of the elements returned by filesystem.listdir. I'm not sure which file Stepmania picks in a DuplicateSimfile-type situation, but a flag to suppress this error would be very helpful for the project I'm working on. Perhaps a warning should be printed to the console to let users know that a duplicate simfile was detected and skipped, and that the file that's being used might not necessarily be the one that Stepmania would use?

I'm also very open to renaming the flag to something a little shorter. I considered strict like for the simfile parser, but it didn't seem descriptive enough.

sebitommy123 commented 1 year ago

lgtm