mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-12 16:02:35 +08:00
fix bug
This commit is contained in:
@@ -34,6 +34,8 @@ class AddDownloadAction(BaseAction):
|
|||||||
super().__init__(action_id)
|
super().__init__(action_id)
|
||||||
self.downloadchain = DownloadChain()
|
self.downloadchain = DownloadChain()
|
||||||
self.mediachain = MediaChain()
|
self.mediachain = MediaChain()
|
||||||
|
self._added_downloads = []
|
||||||
|
self._has_error = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class AddSubscribeAction(BaseAction):
|
|||||||
super().__init__(action_id)
|
super().__init__(action_id)
|
||||||
self.subscribechain = SubscribeChain()
|
self.subscribechain = SubscribeChain()
|
||||||
self.subscribeoper = SubscribeOper()
|
self.subscribeoper = SubscribeOper()
|
||||||
|
self._added_subscribes = []
|
||||||
|
self._has_error = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class FetchDownloadsAction(BaseAction):
|
|||||||
def __init__(self, action_id: str):
|
def __init__(self, action_id: str):
|
||||||
super().__init__(action_id)
|
super().__init__(action_id)
|
||||||
self.chain = ActionChain()
|
self.chain = ActionChain()
|
||||||
|
self._downloads = []
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ class FetchMediasAction(BaseAction):
|
|||||||
def __init__(self, action_id: str):
|
def __init__(self, action_id: str):
|
||||||
super().__init__(action_id)
|
super().__init__(action_id)
|
||||||
|
|
||||||
|
self._medias = []
|
||||||
|
self._has_error = False
|
||||||
self.__inner_sources = [
|
self.__inner_sources = [
|
||||||
{
|
{
|
||||||
"func": RecommendChain().tmdb_trending,
|
"func": RecommendChain().tmdb_trending,
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ class FetchRssAction(BaseAction):
|
|||||||
super().__init__(action_id)
|
super().__init__(action_id)
|
||||||
self.rsshelper = RssHelper()
|
self.rsshelper = RssHelper()
|
||||||
self.chain = ActionChain()
|
self.chain = ActionChain()
|
||||||
|
self._rss_torrents = []
|
||||||
|
self._has_error = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class FetchTorrentsAction(BaseAction):
|
|||||||
def __init__(self, action_id: str):
|
def __init__(self, action_id: str):
|
||||||
super().__init__(action_id)
|
super().__init__(action_id)
|
||||||
self.searchchain = SearchChain()
|
self.searchchain = SearchChain()
|
||||||
|
self._torrents = []
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ class FilterMediasAction(BaseAction):
|
|||||||
|
|
||||||
_medias = []
|
_medias = []
|
||||||
|
|
||||||
|
def __init__(self, action_id: str):
|
||||||
|
super().__init__(action_id)
|
||||||
|
self._medias = []
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
def name(cls) -> str: # noqa
|
def name(cls) -> str: # noqa
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class FilterTorrentsAction(BaseAction):
|
|||||||
super().__init__(action_id)
|
super().__init__(action_id)
|
||||||
self.torrenthelper = TorrentHelper()
|
self.torrenthelper = TorrentHelper()
|
||||||
self.chain = ActionChain()
|
self.chain = ActionChain()
|
||||||
|
self._torrents = []
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ class ScanFileAction(BaseAction):
|
|||||||
def __init__(self, action_id: str):
|
def __init__(self, action_id: str):
|
||||||
super().__init__(action_id)
|
super().__init__(action_id)
|
||||||
self.storagechain = StorageChain()
|
self.storagechain = StorageChain()
|
||||||
|
self._fileitems = []
|
||||||
|
self._has_error = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ class ScrapeFileAction(BaseAction):
|
|||||||
super().__init__(action_id)
|
super().__init__(action_id)
|
||||||
self.storagechain = StorageChain()
|
self.storagechain = StorageChain()
|
||||||
self.mediachain = MediaChain()
|
self.mediachain = MediaChain()
|
||||||
|
self._scraped_files = []
|
||||||
|
self._has_error = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ class TransferFileAction(BaseAction):
|
|||||||
self.transferchain = TransferChain()
|
self.transferchain = TransferChain()
|
||||||
self.storagechain = StorageChain()
|
self.storagechain = StorageChain()
|
||||||
self.transferhis = TransferHistoryOper()
|
self.transferhis = TransferHistoryOper()
|
||||||
|
self._fileitems = []
|
||||||
|
self._has_error = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ class WorkFlowManager(metaclass=Singleton):
|
|||||||
if not context:
|
if not context:
|
||||||
context = ActionContext()
|
context = ActionContext()
|
||||||
if action.type in self._actions:
|
if action.type in self._actions:
|
||||||
|
# 实例化之前,清理掉类对象的数据
|
||||||
|
|
||||||
# 实例化
|
# 实例化
|
||||||
action_obj = self._actions[action.type](action.id)
|
action_obj = self._actions[action.type](action.id)
|
||||||
# 执行
|
# 执行
|
||||||
|
|||||||
Reference in New Issue
Block a user