carykh / recordTrimEdit

Records audio, trims it, and allows you to edit it, all in one fell swoop.
MIT License
66 stars 9 forks source link

Moved configuration to json file #8

Closed FelipeJz closed 5 months ago

FelipeJz commented 5 months ago

Always good the keep the config outside the code

ben9583 commented 5 months ago

Thank you for making this! Maybe can you change it so that if config.json doesn't exist, it creates it with the defaults you have here?

FelipeJz commented 5 months ago

I'm happy to contribute to this project, been using it every day. The file is already created in the commit with the defaults, should we check anyway?

ben9583 commented 5 months ago

I think so; that way if someone moves the python script elsewhere and they no longer have the config, they won't have to try and figure out the schema of the config

ben9583 commented 5 months ago

Right now I'm working on an audio device selector so there will be some merge conflicts with this branch; I can help resolve some of those however

ben9583 commented 5 months ago

I haven't tested these changes yet (just did it in the GitHub merge conflict resolver) so I'm gonna do that

ben9583 commented 5 months ago

I think this should be good; basically what I did was I removed the constants and referenced all config values in the config object, that way any changes to config done by update_config will be propagated to the config.json and there shouldn't be any desync

ben9583 commented 5 months ago

Ok so I merged this, thanks for contributing!