Fixes#193
Add the ability to specify a custom SponsorBlock API server. (draft implementation by copilot-workspace)
* Add a new configuration option `api_server` in `config.json.template` to specify the custom API server URL.
* Remove the hardcoded `SponsorBlock_api` URL from `src/iSponsorBlockTV/constants.py`.
* Update the `ApiHelper` class in `src/iSponsorBlockTV/api_helpers.py` to use the `api_server` configuration option for API calls.
* Add an option to input a custom API server URL in the CLI setup in `src/iSponsorBlockTV/config_setup.py`.
* Add an option to input a custom API server URL in the graphical setup wizard in `src/iSponsorBlockTV/setup_wizard.py`.
* Set the default `api_server` to "https://sponsor.ajay.app" in `src/iSponsorBlockTV/helpers.py`.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/dmunozv04/iSponsorBlockTV/issues/193?shareId=XXXX-XXXX-XXXX-XXXX).
The use of `else` or `elif` becomes redundant and can be dropped if the last statement under the leading `if` / `elif` block is a `continue` statement.
In the case of an `elif` after `continue`, it can be written as a separate `if` block.
For `else` blocks after `continue`, the statements can be shifted out of `else`. Please refer to the examples below for reference.
Refactoring the code this way can improve code-readability and make it easier to maintain.
Using `range(len(...))` is not pythonic. Python does not have not index-based loops. Instead, it uses collection iterators. Python has a built-in method `enumerate` which adds a counter to an iterable.
The use of `else` or `elif` becomes redundant and can be dropped if the last statement under the leading `if` / `elif` block is a `return` statement.
In the case of an `elif` after `return`, it can be written as a separate `if` block.
For `else` blocks after `return`, the statements can be shifted out of `else`. Please refer to the examples below for reference.
Refactoring the code this way can improve code-readability and make it easier to maintain.