add plugins

This commit is contained in:
jxxghp
2023-06-08 13:18:26 +08:00
parent 7c3f233a10
commit c7d745a752
49 changed files with 4383 additions and 73 deletions

View File

@ -7,7 +7,7 @@ from app.log import logger
from app.utils.singleton import AbstractSingleton, Singleton
class _ChainBase(AbstractSingleton, metaclass=Singleton):
class ChainBase(AbstractSingleton, metaclass=Singleton):
"""
处理链基类
"""

View File

@ -2,7 +2,7 @@ import re
from pathlib import Path
from typing import List, Optional, Tuple, Set
from app.chain import _ChainBase
from app.chain import ChainBase
from app.core import MediaInfo
from app.core import TorrentInfo, Context
from app.core.meta import MetaBase
@ -12,7 +12,7 @@ from app.utils.string import StringUtils
from app.utils.types import MediaType
class CommonChain(_ChainBase):
class CommonChain(ChainBase):
def __init__(self):
super().__init__()

View File

@ -1,6 +1,6 @@
from typing import Tuple
from app.chain import _ChainBase
from app.chain import ChainBase
from app.core import settings
from app.db.sites import Sites
from app.helper.cookiecloud import CookieCloudHelper
@ -8,7 +8,7 @@ from app.helper.sites import SitesHelper
from app.log import logger
class CookieCloudChain(_ChainBase):
class CookieCloudChain(ChainBase):
"""
同步站点Cookie
"""

View File

@ -1,7 +1,7 @@
from pathlib import Path
from typing import Optional
from app.chain import _ChainBase
from app.chain import ChainBase
from app.chain.common import CommonChain
from app.chain.search import SearchChain
from app.core import settings, MetaInfo, MediaInfo
@ -10,7 +10,7 @@ from app.helper.rss import RssHelper
from app.log import logger
class DoubanSyncChain(_ChainBase):
class DoubanSyncChain(ChainBase):
"""
同步豆瓣想看数据
"""

View File

@ -1,11 +1,11 @@
from typing import Optional
from app.chain import _ChainBase
from app.chain import ChainBase
from app.core import Context, MetaInfo, MediaInfo
from app.log import logger
class IdentifyChain(_ChainBase):
class IdentifyChain(ChainBase):
"""
识别处理链
"""

View File

@ -1,6 +1,6 @@
from typing import Optional, List
from app.chain import _ChainBase
from app.chain import ChainBase
from app.chain.common import CommonChain
from app.core import Context, MetaInfo, MediaInfo, TorrentInfo, settings
from app.core.meta import MetaBase
@ -8,7 +8,7 @@ from app.helper.sites import SitesHelper
from app.log import logger
class SearchChain(_ChainBase):
class SearchChain(ChainBase):
"""
站点资源搜索处理链
"""

View File

@ -1,6 +1,6 @@
from typing import Dict, List, Optional
from app.chain import _ChainBase
from app.chain import ChainBase
from app.chain.common import CommonChain
from app.chain.search import SearchChain
from app.core import MetaInfo, TorrentInfo, Context, MediaInfo, settings
@ -11,7 +11,7 @@ from app.utils.string import StringUtils
from app.utils.types import MediaType
class SubscribeChain(_ChainBase):
class SubscribeChain(ChainBase):
"""
订阅处理链
"""

View File

@ -1,13 +1,13 @@
from pathlib import Path
from typing import List, Optional
from app.chain import _ChainBase
from app.chain import ChainBase
from app.core import MetaInfo, MediaInfo, settings
from app.log import logger
from app.utils.types import TorrentStatus
class TransferChain(_ChainBase):
class TransferChain(ChainBase):
"""
文件转移处理链
"""

View File

@ -2,7 +2,7 @@ from typing import Dict
from fastapi import Request
from app.chain import _ChainBase
from app.chain import ChainBase
from app.chain.common import *
from app.chain.search import SearchChain
from app.core import MediaInfo, TorrentInfo, MetaInfo
@ -11,7 +11,7 @@ from app.log import logger
from app.utils.types import EventType
class UserMessageChain(_ChainBase):
class UserMessageChain(ChainBase):
"""
外来消息处理链
"""

View File

@ -1,7 +1,7 @@
from app.chain import _ChainBase
from app.chain import ChainBase
class WebhookMessageChain(_ChainBase):
class WebhookMessageChain(ChainBase):
"""
响应Webhook事件
"""