Open kai-tub opened 3 months ago
Ah, sorry. I never got a notification for the :+1: emoji... I have been running my own patch for some time, and I've seen https://github.com/simulot/immich-go/issues/211 has been merged in the mean time. Would you accept a PR that would split up the configuration file into individual files? My motivation is again linked to secrets being stored in a non-writeable location (the API token). But the host URL for example, is something I would like to inspect/change/update and not "hard-code" into the secret/configuration file.
But I can also understand if this is not something you are interested in. Just let me know :+1:
I'm working on a version with a better user interface. I'll use your pr
Hey, thanks for the project! :pray:
I am experiencing an issue where the configuration
json
file is always being written even if it already exists on disk. After a quick look, I assume that the issue is from the lines below:https://github.com/simulot/immich-go/blob/9c624732e605e7e85f855e853346dd3c8c4f4ced/cmd/shared.go#L107-L131
It reads the configuration and later writes the configuration irrespective of whether the data was complete. If I understand correctly, the JSON file doesn't need to be updated over time.
The reason is that my secrets are stored on a read-only file system (for further reference, see LoadCredential from systemd) and that currently triggers the errors.
I believe it would be sufficient to check if the config was read and only write if no config file was read or if a new CLI argument was used. I have a draft PR/commit available if it helps:
https://github.com/simulot/immich-go/commit/3b560c18b98712c3f7ef1734f05a44614ab5592c
Also happy to refactor if necessary :)