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

fix(#7): add "base" key in config to specify base url #23

Merged
merged 2 commits into from
May 18, 2024
Merged

fix(#7): add "base" key in config to specify base url #23

merged 2 commits into from
May 18, 2024

Conversation

matt1432
Copy link
Contributor

I tested this and it worked with the example I added in ./examples.

If you feel like "base" is too vague feel free to change the name. It could be base_url but you already use that name elsewhere so I wasn't sure what to do with that.

I've never coded in rust before so I'm not sure if I needed to add this line:

.set_default("base", "")?

or is that already default?

Finally, it might be important to say somewhere that the leading slash in the base url is needed, or we could figure out a way to make it not needed. Not sure what the proper way to do this would be.

@mateoradman
Copy link
Owner

Hi @matt1432, many thanks for this pull request. I will quickly take a look at code, and test it. After that, I will address your comments regarding the naming convention, and making the leading slash optional.

Adding a line .set_default("base", "")? is a good idea, to set the base url to an empty string if not present in the config.json file.

…ing any leading or trailing slashes from the base url
@mateoradman mateoradman self-assigned this May 18, 2024
@mateoradman mateoradman linked an issue May 18, 2024 that may be closed by this pull request
@mateoradman
Copy link
Owner

Thanks @matt1432, I've addressed both points in my last commit. The baseUrl field in the config.json does not require a leading slash anymore. I've also renamed the base_url to bazarr_url and base to base_url to follow a nice naming convention in accordance with Bazarr.

@mateoradman mateoradman merged commit 863d25c into mateoradman:main May 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: reqwest::Error
3 participants