[fix] engines: base URL can be a list or a string, but its not None!

The code injection and monkey patching examine the names in the module of the
engine; if a variable there starts without an underscore and has the value None,
then this variable needs to be configured. This outdated concept does not fit
engines that may have multiple URLs. At least not as long as the value of the
base URL (list) is None.

The default is now an empty list instead of None

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser
2025-11-23 12:33:16 +01:00
committed by Markus Heiser
parent 989b49335c
commit 2313b972a3
4 changed files with 4 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ paging = True
time_range_support = True time_range_support = True
# base_url can be overwritten by a list of URLs in the settings.yml # base_url can be overwritten by a list of URLs in the settings.yml
base_url: list | str = [] base_url: list[str] | str = []
def init(_): def init(_):

View File

@@ -72,7 +72,7 @@ categories = []
paging = True paging = True
# search-url # search-url
backend_url: list[str] | str | None = None backend_url: list[str] | str = []
"""Piped-Backend_: The core component behind Piped. The value is an URL or a """Piped-Backend_: The core component behind Piped. The value is an URL or a
list of URLs. In the latter case instance will be selected randomly. For a list of URLs. In the latter case instance will be selected randomly. For a
complete list of official instances see Piped-Instances (`JSON complete list of official instances see Piped-Instances (`JSON

View File

@@ -20,7 +20,7 @@ categories = ['images']
# Search URL # Search URL
base_url = "https://www.pixiv.net/ajax/search/illustrations" base_url = "https://www.pixiv.net/ajax/search/illustrations"
pixiv_image_proxies: list = [] pixiv_image_proxies: list[str] = []
def request(query, params): def request(query, params):

View File

@@ -96,7 +96,7 @@ search_type = 'text'
``video`` are not yet implemented (Pull-Requests are welcome). ``video`` are not yet implemented (Pull-Requests are welcome).
""" """
base_url: list[str] | str | None = None base_url: list[str] | str = []
"""The value is an URL or a list of URLs. In the latter case instance will be """The value is an URL or a list of URLs. In the latter case instance will be
selected randomly. selected randomly.
""" """