PCJones / UmlautAdaptarr

A tool to work around Sonarr, Radarr, Lidarr and Readarrs problems with foreign languages
58 stars 3 forks source link

Add Proxy Support, Add IOptions Pattern, Add Extensions Method and Global Logger #9

Closed xpsony closed 5 months ago

xpsony commented 7 months ago

Currently Changes

Breaking Change :

Because Microsoft parses the Env variables differently for IOptions. The following changes must be made for existing users.

Wherever "_" is used, "__" must now be used

Example :

SONARR_ENABLED becomes SONARR__ENABLED

Further examples can be found in appsettings.json

I don't know if there is a way to customise the format. But this is the standard that Microsoft recommends

Note : Only tested with Sonarr , but the Others should work too

PCJones commented 7 months ago

Thanks a ton! I'll have a clooser look soon.

I just had a quick glance at the code so far - I'm planning to allow multiple instances of the same *arr client. Does your refactoring limit this in any way (more than the old code did that is :D)?

xpsony commented 7 months ago

No, definitely not :). This makes it even easier for you. IOption is great for customization and dependency injection, you would create a new model with an object array for Sonar clients, lidar clients,... and then simply go over the array at the appropriate point with for each. We would just have to find a nice solution for the docker variables. But I think the best way at this point would be to put the app settings outside with a docker volume. So that the user can make faster and more advanced customizations. But the docker env approach should also work. The overkill would be to fork prowlarr and use their Ui interface 🤪. But then we would have to throw away a lot from their Code 😂. Once you have decided whether to accept the changes. I would add a some validation and optimize the api calls. I have a few other ideas :). But I don't know when I have time to implement them. So far my fork is running very well on my system 🙂👍

PCJones commented 6 months ago

Sorry for taking so long, I'll definitely implement this. Just need the time :D

PCJones commented 6 months ago

On it now. Just FYI in case you are interested, we have a discord server where we discuss the UmlautAdaptarr (among other *arr related stuff): https://discord.gg/pZrrMcJMQM