refactor backend module architecture

This commit is contained in:
jxxghp
2026-08-14 15:45:38 +08:00
parent 557cc0e2e3
commit 7b3444c366
716 changed files with 10378 additions and 7709 deletions
+6 -6
View File
@@ -9,13 +9,13 @@ from fastapi.concurrency import run_in_threadpool
from jinja2 import Template
from pyquery import PyQuery
from app.core.config import settings
from app.log import logger
from app.platform.config import settings
from app.platform.log import logger
from app.schemas.types import MediaType
from app.utils import rust_accel
from app.utils.http import RequestUtils, AsyncRequestUtils
from app.utils.string import StringUtils
from app.utils.url import UrlUtils
from app.infrastructure import rust as rust_accel
from app.foundation.http import RequestUtils, AsyncRequestUtils
from app.domain.string import StringUtils
from app.foundation.url import UrlUtils
def select_media_categories(category: Optional[dict], mtype: Optional[MediaType]) -> list[dict]:
+4 -4
View File
@@ -1,12 +1,12 @@
import urllib.parse
from typing import Tuple, List
from app.core.config import settings
from app.platform.config import settings
from app.db.systemconfig_oper import SystemConfigOper
from app.log import logger
from app.platform.log import logger
from app.schemas import MediaType
from app.utils.http import RequestUtils, AsyncRequestUtils
from app.utils.string import StringUtils
from app.foundation.http import RequestUtils, AsyncRequestUtils
from app.domain.string import StringUtils
class HaiDanSpider:
+4 -4
View File
@@ -1,11 +1,11 @@
from typing import Tuple, List, Optional
from app.core.config import settings
from app.platform.config import settings
from app.db.systemconfig_oper import SystemConfigOper
from app.log import logger
from app.platform.log import logger
from app.schemas import MediaType
from app.utils.http import RequestUtils, AsyncRequestUtils
from app.utils.string import StringUtils
from app.foundation.http import RequestUtils, AsyncRequestUtils
from app.domain.string import StringUtils
class HddolbySpider:
+4 -4
View File
@@ -4,12 +4,12 @@ import re
from typing import Tuple, List, Optional
from urllib.parse import urlparse
from app.core.config import settings
from app.platform.config import settings
from app.db.systemconfig_oper import SystemConfigOper
from app.log import logger
from app.platform.log import logger
from app.schemas import MediaType
from app.utils.http import RequestUtils, AsyncRequestUtils
from app.utils.string import StringUtils
from app.foundation.http import RequestUtils, AsyncRequestUtils
from app.domain.string import StringUtils
class MTorrentSpider:
+4 -4
View File
@@ -2,12 +2,12 @@ import base64
import json
from typing import List, Optional, Tuple
from app.core.config import settings
from app.platform.config import settings
from app.db.systemconfig_oper import SystemConfigOper
from app.log import logger
from app.platform.log import logger
from app.schemas import MediaType
from app.utils.http import RequestUtils, AsyncRequestUtils
from app.utils.string import StringUtils
from app.foundation.http import RequestUtils, AsyncRequestUtils
from app.domain.string import StringUtils
class RousiSpider:
+4 -4
View File
@@ -3,11 +3,11 @@ import json
import time
from typing import List, Optional, Tuple
from app.core.config import settings
from app.log import logger
from app.platform.config import settings
from app.platform.log import logger
from app.schemas import MediaType
from app.utils.http import AsyncRequestUtils, RequestUtils
from app.utils.string import StringUtils
from app.foundation.http import AsyncRequestUtils, RequestUtils
from app.domain.string import StringUtils
class SunnyPTSpider:
+6 -6
View File
@@ -1,12 +1,12 @@
import re
from typing import Tuple, List, Optional
from app.core.cache import cached
from app.core.config import settings
from app.log import logger
from app.utils.http import RequestUtils, AsyncRequestUtils
from app.utils.singleton import SingletonClass
from app.utils.string import StringUtils
from app.platform.cache import cached
from app.platform.config import settings
from app.platform.log import logger
from app.foundation.http import RequestUtils, AsyncRequestUtils
from app.foundation.singleton import SingletonClass
from app.domain.string import StringUtils
class TNodeSpider(metaclass=SingletonClass):
+4 -4
View File
@@ -1,11 +1,11 @@
from typing import List, Tuple, Optional
from urllib.parse import quote
from app.core.config import settings
from app.log import logger
from app.platform.config import settings
from app.platform.log import logger
from app.schemas import MediaType
from app.utils.http import RequestUtils, AsyncRequestUtils
from app.utils.string import StringUtils
from app.foundation.http import RequestUtils, AsyncRequestUtils
from app.domain.string import StringUtils
class TorrentLeech:
+4 -4
View File
@@ -2,11 +2,11 @@ import base64
import json
from typing import List, Optional, Tuple
from app.core.config import settings
from app.log import logger
from app.platform.config import settings
from app.platform.log import logger
from app.schemas import MediaType
from app.utils.http import AsyncRequestUtils, RequestUtils
from app.utils.string import StringUtils
from app.foundation.http import AsyncRequestUtils, RequestUtils
from app.domain.string import StringUtils
class YemaSpider: