mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 07:27:15 +08:00
refactor backend module architecture
This commit is contained in:
@@ -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]:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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,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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user