refactor: use explicit system config getter

This commit is contained in:
jxxghp
2026-08-24 04:04:35 +08:00
parent 4dd2d7fed2
commit 8555d0da3e
28 changed files with 111 additions and 76 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ from typing import Tuple, List
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.application.configuration import get_configured_system_config as SystemConfigOper
from app.application.configuration import get_configured_system_config
from app.runtime.log import logger
from app.schemas.types import MediaType
from app.adapters.network.http import RequestUtils, AsyncRequestUtils
@@ -62,7 +62,7 @@ class HaiDanSpider:
return None
def __init__(self, indexer: dict):
self.systemconfig = SystemConfigOper()
self.systemconfig = get_configured_system_config()
if indexer:
self._indexerid = indexer.get('id')
self._url = indexer.get('domain')
+2 -2
View File
@@ -3,7 +3,7 @@ from typing import Tuple, List, Optional
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.application.configuration import get_configured_system_config as SystemConfigOper
from app.application.configuration import get_configured_system_config
from app.runtime.log import logger
from app.schemas.types import MediaType
from app.adapters.network.http import RequestUtils, AsyncRequestUtils
@@ -69,7 +69,7 @@ class HddolbySpider:
return cls._size
def __init__(self, indexer: dict):
self.systemconfig = SystemConfigOper()
self.systemconfig = get_configured_system_config()
if indexer:
self._indexerid = indexer.get('id')
self._domain = indexer.get('domain')
+2 -2
View File
@@ -7,7 +7,7 @@ from urllib.parse import urlparse
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.application.configuration import get_configured_system_config as SystemConfigOper
from app.application.configuration import get_configured_system_config
from app.runtime.log import logger
from app.schemas.types import MediaType
from app.adapters.network.http import RequestUtils, AsyncRequestUtils
@@ -67,7 +67,7 @@ class MTorrentSpider:
return cls._size
def __init__(self, indexer: dict):
self.systemconfig = SystemConfigOper()
self.systemconfig = get_configured_system_config()
if indexer:
self._indexerid = indexer.get('id')
self._url = indexer.get('domain')
+2 -2
View File
@@ -5,7 +5,7 @@ from typing import List, Optional, Tuple
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.application.configuration import get_configured_system_config as SystemConfigOper
from app.application.configuration import get_configured_system_config
from app.runtime.log import logger
from app.schemas.types import MediaType
from app.adapters.network.http import RequestUtils, AsyncRequestUtils
@@ -51,7 +51,7 @@ class RousiSpider:
return cls._size
def __init__(self, indexer: dict):
self.systemconfig = SystemConfigOper()
self.systemconfig = get_configured_system_config()
if indexer:
self._indexerid = indexer.get('id')
self._url = indexer.get('domain')