add 事件广播

This commit is contained in:
jxxghp
2023-06-16 07:11:14 +08:00
parent ed14485092
commit 6a5e117f0b
49 changed files with 70 additions and 49 deletions

View File

@ -7,7 +7,7 @@ from ruamel.yaml import CommentedMap
from app.core.context import MediaInfo, TorrentInfo, Context
from app.core.meta import MetaBase
from app.schemas.context import TransferInfo, TransferTorrent, ExistMediaInfo, DownloadingTorrent
from app.utils.types import TorrentStatus, MediaType
from app.schemas.types import TorrentStatus, MediaType
class _ModuleBase(metaclass=ABCMeta):

View File

@ -13,7 +13,7 @@ from app.modules.douban.apiv2 import DoubanApi
from app.utils.dom import DomUtils
from app.utils.http import RequestUtils
from app.utils.system import SystemUtils
from app.utils.types import MediaType
from app.schemas.types import MediaType
class DoubanModule(_ModuleBase):

View File

@ -6,7 +6,7 @@ from app.log import logger
from app.modules import _ModuleBase
from app.modules.emby.emby import Emby
from app.schemas.context import ExistMediaInfo, RefreshMediaItem
from app.utils.types import MediaType
from app.schemas.types import MediaType
class EmbyModule(_ModuleBase):

View File

@ -9,7 +9,7 @@ from app.schemas.context import RefreshMediaItem
from app.utils.http import RequestUtils
from app.utils.singleton import Singleton
from app.utils.string import StringUtils
from app.utils.types import MediaType
from app.schemas.types import MediaType
class Emby(metaclass=Singleton):

View File

@ -6,7 +6,7 @@ from app.core.context import MediaInfo, settings
from app.log import logger
from app.modules import _ModuleBase
from app.utils.http import RequestUtils
from app.utils.types import MediaType
from app.schemas.types import MediaType
class FanartModule(_ModuleBase):

View File

@ -13,7 +13,7 @@ from app.log import logger
from app.modules import _ModuleBase
from app.schemas.context import TransferInfo
from app.utils.system import SystemUtils
from app.utils.types import MediaType
from app.schemas.types import MediaType
lock = Lock()

View File

@ -11,7 +11,7 @@ from app.modules.indexer.spider import TorrentSpider
from app.modules.indexer.tnode import TNodeSpider
from app.modules.indexer.torrentleech import TorrentLeech
from app.utils.string import StringUtils
from app.utils.types import MediaType
from app.schemas.types import MediaType
class IndexerModule(_ModuleBase):

View File

@ -14,7 +14,7 @@ from app.helper.browser import PlaywrightHelper
from app.log import logger
from app.utils.http import RequestUtils
from app.utils.string import StringUtils
from app.utils.types import MediaType
from app.schemas.types import MediaType
class TorrentSpider:

View File

@ -7,7 +7,7 @@ from app.log import logger
from app.modules import _ModuleBase
from app.modules.jellyfin.jellyfin import Jellyfin
from app.schemas.context import ExistMediaInfo
from app.utils.types import MediaType
from app.schemas.types import MediaType
class JellyfinModule(_ModuleBase):

View File

@ -6,7 +6,7 @@ from app.log import logger
from app.modules import _ModuleBase
from app.modules.plex.plex import Plex
from app.schemas.context import ExistMediaInfo, RefreshMediaItem
from app.utils.types import MediaType
from app.schemas.types import MediaType
class PlexModule(_ModuleBase):

View File

@ -8,7 +8,7 @@ from app.modules import _ModuleBase
from app.modules.qbittorrent.qbittorrent import Qbittorrent
from app.schemas.context import TransferInfo, TransferTorrent, DownloadingTorrent
from app.utils.string import StringUtils
from app.utils.types import TorrentStatus
from app.schemas.types import TorrentStatus
class QbittorrentModule(_ModuleBase):

View File

@ -15,7 +15,7 @@ from app.modules.themoviedb.tmdb_cache import TmdbCache
from app.utils.dom import DomUtils
from app.utils.http import RequestUtils
from app.utils.system import SystemUtils
from app.utils.types import MediaType
from app.schemas.types import MediaType
class TheMovieDbModule(_ModuleBase):

View File

@ -12,7 +12,7 @@ from app.core.config import settings
from app.log import logger
from app.utils.http import RequestUtils
from app.utils.string import StringUtils
from app.utils.types import MediaType
from app.schemas.types import MediaType
class TmdbHelper:

View File

@ -8,7 +8,7 @@ from typing import Optional
from app.core.config import settings
from app.core.meta import MetaBase
from app.utils.singleton import Singleton
from app.utils.types import MediaType
from app.schemas.types import MediaType
lock = RLock()

View File

@ -7,7 +7,7 @@ from app.log import logger
from app.modules import _ModuleBase
from app.modules.transmission.transmission import Transmission
from app.schemas.context import TransferInfo, TransferTorrent, DownloadingTorrent
from app.utils.types import TorrentStatus
from app.schemas.types import TorrentStatus
class TransmissionModule(_ModuleBase):