Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file support for sabnzbd, bazarr #294

Open
rouke-broersma opened this issue Apr 29, 2024 · 3 comments
Open

Config file support for sabnzbd, bazarr #294

rouke-broersma opened this issue Apr 29, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rouke-broersma
Copy link

Details

Describe the solution you'd like:

It seems to me like the config file is not supported for sabnzbd, bazarr and possibly other apps that don't follow the common xml config file. It would be great if that could be supported so I don't have to create an api key secret and can leverage the sidecar pattern to load the config. I have checked and both sabnzbd and bazarr contain the api key in a config file. For sabnzbd it's in the ini format and for modern bazarr it seems to be in yaml format.

@rouke-broersma rouke-broersma added the enhancement New feature or request label Apr 29, 2024
@onedr0p
Copy link
Owner

onedr0p commented Apr 29, 2024

I am open to PRs for this. 👍🏼

@rtrox
Copy link
Collaborator

rtrox commented May 3, 2024

Both TOML (ini) and YAML are supported by Koanf, this shouldn't be terribly difficult.

https://github.com/knadh/koanf?tab=readme-ov-file#bundled-parsers

The XML parsing logic to use as a guide:

https://github.com/knadh/koanf?tab=readme-ov-file#bundled-parsers

Bazarr Loader: https://github.com/onedr0p/exportarr/blob/master/internal/arr/config/bazarr.go#L43
SabNZB Loader: https://github.com/onedr0p/exportarr/blob/master/internal/sabnzbd/config/config.go#L14-L21

Things are a bit crazy for me at work, or I'd pick this up. Glad to review PRs, and I may be able to come back to this later on if no one picks it up.

@rtrox rtrox closed this as completed May 3, 2024
@rtrox rtrox reopened this May 3, 2024
@rtrox rtrox added the good first issue Good for newcomers label May 3, 2024
@rouke-broersma
Copy link
Author

Had a look at this and as you said in theory it should be easy enough but I really seem to have trouble grasping Golang unfortunately..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants