devgianlu / go-librespot

Yet another open source Spotify client, written in Go.
GNU General Public License v3.0
134 stars 17 forks source link

Proposal: move configuration to config directory #100

Closed aykevl closed 1 month ago

aykevl commented 1 month ago

Right now, go-librespot reads configuration and credentials from the current working directory (unless specified otherwise). I propose we use the following scheme instead:

There are a few reasons why I think this is a good idea:

@devgianlu if you agree with this scheme I'd like to implement this (but asking here first before I put a lot of work into it).

Willyarma commented 1 month ago

Its more useful to me the way it is for my application, is there a way we can have both? perhaps with a command line option?

aykevl commented 1 month ago

@Willyarma yes, if there's a flag to set the config directory then you can set it to use the current working directory.

Willyarma commented 1 month ago

I already made a request in #80 for command line options. Its loosly related to this. I was thinking about creating the config file dynamically on the fly then realised if I launch all instances in parallel then that wont work. A command line path / filename for different config files would though.

Edit: Looks like it was already done, sorry I didnt realise.

devgianlu commented 1 month ago

@aykevl This sounds like a great idea, especially in tackling #81. I have recently refactored the configuration code to use koanf so it's a little bit nicer, but this is even better.

aykevl commented 1 month ago

Proposal is implemented in #103 so closing.