add webhook schemas

This commit is contained in:
jxxghp
2023-07-27 08:21:41 +08:00
parent 7699d4fc1b
commit 4039accf6d
9 changed files with 122 additions and 98 deletions

View File

@ -6,7 +6,7 @@ from app.core.context import MediaInfo
from app.log import logger
from app.modules import _ModuleBase
from app.modules.emby.emby import Emby
from app.schemas import ExistMediaInfo, RefreshMediaItem
from app.schemas import ExistMediaInfo, RefreshMediaItem, WebhookEventInfo
from app.schemas.types import MediaType
@ -32,7 +32,7 @@ class EmbyModule(_ModuleBase):
# Emby认证
return self.emby.authenticate(name, password)
def webhook_parser(self, body: Any, form: Any, args: Any) -> Optional[dict]:
def webhook_parser(self, body: Any, form: Any, args: Any) -> WebhookEventInfo:
"""
解析Webhook报文体
:param body: 请求体