Fix feed validation output
This commit is contained in:
parent
c834c3c254
commit
db1d9b44b7
13 changed files with 477 additions and 54 deletions
|
|
@ -34,6 +34,8 @@ DATABASE_PRAGMAS = {
|
|||
SCHEMA_GLOB = "*.sql"
|
||||
MAX_CONCURRENT_JOBS_SETTING_KEY = "max_concurrent_jobs"
|
||||
DEFAULT_MAX_CONCURRENT_JOBS = 1
|
||||
FEED_URL_SETTING_KEY = "feed_url"
|
||||
DEFAULT_FEED_URL = ""
|
||||
|
||||
database = SqliteDatabase(None, pragmas=DATABASE_PRAGMAS)
|
||||
|
||||
|
|
@ -163,8 +165,16 @@ def load_max_concurrent_jobs() -> int:
|
|||
return parsed if parsed >= 1 else DEFAULT_MAX_CONCURRENT_JOBS
|
||||
|
||||
|
||||
def load_feed_url() -> str:
|
||||
value = load_setting(FEED_URL_SETTING_KEY, DEFAULT_FEED_URL)
|
||||
return value if isinstance(value, str) else DEFAULT_FEED_URL
|
||||
|
||||
|
||||
def load_settings_form() -> dict[str, object]:
|
||||
return {"max_concurrent_jobs": load_max_concurrent_jobs()}
|
||||
return {
|
||||
"max_concurrent_jobs": load_max_concurrent_jobs(),
|
||||
"feed_url": load_feed_url(),
|
||||
}
|
||||
|
||||
|
||||
def load_source_form(slug: str) -> dict[str, object] | None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue