mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-04 03:09:19 +08:00
fix bug
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -21,6 +21,7 @@ class FetchDownloadsAction(BaseAction):
|
||||
def __init__(self, action_id: str):
|
||||
super().__init__(action_id)
|
||||
self.chain = ActionChain()
|
||||
self._downloads = []
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,6 +34,7 @@ class FetchTorrentsAction(BaseAction):
|
||||
def __init__(self, action_id: str):
|
||||
super().__init__(action_id)
|
||||
self.searchchain = SearchChain()
|
||||
self._torrents = []
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -33,6 +33,7 @@ class FilterTorrentsAction(BaseAction):
|
||||
super().__init__(action_id)
|
||||
self.torrenthelper = TorrentHelper()
|
||||
self.chain = ActionChain()
|
||||
self._torrents = []
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,6 +34,8 @@ class TransferFileAction(BaseAction):
|
||||
self.transferchain = TransferChain()
|
||||
self.storagechain = StorageChain()
|
||||
self.transferhis = TransferHistoryOper()
|
||||
self._fileitems = []
|
||||
self._has_error = False
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
|
||||
@@ -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)
|
||||
# 执行
|
||||
|
||||
Reference in New Issue
Block a user