This commit is contained in:
jxxghp
2025-03-04 14:22:32 +08:00
parent 9be2686733
commit affcb9d5c3
12 changed files with 23 additions and 0 deletions

View File

@@ -34,6 +34,8 @@ class AddDownloadAction(BaseAction):
super().__init__(action_id)
self.downloadchain = DownloadChain()
self.mediachain = MediaChain()
self._added_downloads = []
self._has_error = False
@classmethod
@property

View File

@@ -26,6 +26,8 @@ class AddSubscribeAction(BaseAction):
super().__init__(action_id)
self.subscribechain = SubscribeChain()
self.subscribeoper = SubscribeOper()
self._added_subscribes = []
self._has_error = False
@classmethod
@property

View File

@@ -21,6 +21,7 @@ class FetchDownloadsAction(BaseAction):
def __init__(self, action_id: str):
super().__init__(action_id)
self.chain = ActionChain()
self._downloads = []
@classmethod
@property

View File

@@ -34,6 +34,8 @@ class FetchMediasAction(BaseAction):
def __init__(self, action_id: str):
super().__init__(action_id)
self._medias = []
self._has_error = False
self.__inner_sources = [
{
"func": RecommendChain().tmdb_trending,

View File

@@ -36,6 +36,8 @@ class FetchRssAction(BaseAction):
super().__init__(action_id)
self.rsshelper = RssHelper()
self.chain = ActionChain()
self._rss_torrents = []
self._has_error = False
@classmethod
@property

View File

@@ -34,6 +34,7 @@ class FetchTorrentsAction(BaseAction):
def __init__(self, action_id: str):
super().__init__(action_id)
self.searchchain = SearchChain()
self._torrents = []
@classmethod
@property

View File

@@ -24,6 +24,10 @@ class FilterMediasAction(BaseAction):
_medias = []
def __init__(self, action_id: str):
super().__init__(action_id)
self._medias = []
@classmethod
@property
def name(cls) -> str: # noqa

View File

@@ -33,6 +33,7 @@ class FilterTorrentsAction(BaseAction):
super().__init__(action_id)
self.torrenthelper = TorrentHelper()
self.chain = ActionChain()
self._torrents = []
@classmethod
@property

View File

@@ -30,6 +30,8 @@ class ScanFileAction(BaseAction):
def __init__(self, action_id: str):
super().__init__(action_id)
self.storagechain = StorageChain()
self._fileitems = []
self._has_error = False
@classmethod
@property

View File

@@ -28,6 +28,8 @@ class ScrapeFileAction(BaseAction):
super().__init__(action_id)
self.storagechain = StorageChain()
self.mediachain = MediaChain()
self._scraped_files = []
self._has_error = False
@classmethod
@property

View File

@@ -34,6 +34,8 @@ class TransferFileAction(BaseAction):
self.transferchain = TransferChain()
self.storagechain = StorageChain()
self.transferhis = TransferHistoryOper()
self._fileitems = []
self._has_error = False
@classmethod
@property

View File

@@ -63,6 +63,8 @@ class WorkFlowManager(metaclass=Singleton):
if not context:
context = ActionContext()
if action.type in self._actions:
# 实例化之前,清理掉类对象的数据
# 实例化
action_obj = self._actions[action.type](action.id)
# 执行