add ModuleType Schema

This commit is contained in:
jxxghp
2024-10-12 11:50:00 +08:00
parent fcfeeb09d3
commit 603ab97665
27 changed files with 248 additions and 148 deletions
+9 -1
View File
@@ -7,6 +7,7 @@ from app.core.meta import MetaBase
from app.log import logger
from app.modules import _ModuleBase
from app.modules.bangumi.bangumi import BangumiApi
from app.schemas.types import ModuleType
from app.utils.http import RequestUtils
@@ -35,7 +36,14 @@ class BangumiModule(_ModuleBase):
@staticmethod
def get_name() -> str:
return "Bangumi"
return "Bangumi"@staticmethod
@staticmethod
def get_type() -> ModuleType:
"""
获取模块类型
"""
return ModuleType.MediaRecognize
def recognize_media(self, bangumiid: int = None,
**kwargs) -> Optional[MediaInfo]: