From 989d6e3fe7e335b6e3ee4ca103b54c0f1748e404 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 28 Sep 2023 17:29:21 +0800 Subject: [PATCH] fix --- app/plugins/chinesesubfinder/__init__.py | 4 ++-- app/plugins/personmeta/__init__.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/plugins/chinesesubfinder/__init__.py b/app/plugins/chinesesubfinder/__init__.py index 8a4b75db..d55e3ddf 100644 --- a/app/plugins/chinesesubfinder/__init__.py +++ b/app/plugins/chinesesubfinder/__init__.py @@ -4,7 +4,7 @@ from typing import List, Tuple, Dict, Any from app.core.config import settings from app.core.context import MediaInfo -from app.core.event import eventmanager +from app.core.event import eventmanager, Event from app.log import logger from app.plugins import _PluginBase from app.schemas import TransferInfo @@ -183,7 +183,7 @@ class ChineseSubFinder(_PluginBase): pass @eventmanager.register(EventType.TransferComplete) - def download(self, event): + def download(self, event: Event): """ 调用ChineseSubFinder下载字幕 """ diff --git a/app/plugins/personmeta/__init__.py b/app/plugins/personmeta/__init__.py index b581a862..32e1893d 100644 --- a/app/plugins/personmeta/__init__.py +++ b/app/plugins/personmeta/__init__.py @@ -1,6 +1,8 @@ from typing import Any, List, Dict, Tuple +from app.core.event import eventmanager, Event from app.plugins import _PluginBase +from app.schemas.types import EventType class PersonMeta(_PluginBase): @@ -80,6 +82,13 @@ class PersonMeta(_PluginBase): def get_page(self) -> List[dict]: pass + @eventmanager.register(EventType.TransferComplete) + def scrap_rt(self, event: Event): + """ + 根据事件实时刮削演员信息 + """ + pass + def stop_service(self): """ 退出插件