fix #726
This commit is contained in:
parent
a0ced4e43c
commit
0e30ea92f1
@ -49,6 +49,7 @@ class BrushFlow(_PluginBase):
|
|||||||
siteshelper = None
|
siteshelper = None
|
||||||
siteoper = None
|
siteoper = None
|
||||||
torrents = None
|
torrents = None
|
||||||
|
sites = None
|
||||||
qb = None
|
qb = None
|
||||||
tr = None
|
tr = None
|
||||||
# 添加种子定时
|
# 添加种子定时
|
||||||
@ -88,6 +89,7 @@ class BrushFlow(_PluginBase):
|
|||||||
self.siteshelper = SitesHelper()
|
self.siteshelper = SitesHelper()
|
||||||
self.siteoper = SiteOper()
|
self.siteoper = SiteOper()
|
||||||
self.torrents = TorrentsChain()
|
self.torrents = TorrentsChain()
|
||||||
|
self.sites = SitesHelper()
|
||||||
if config:
|
if config:
|
||||||
self._enabled = config.get("enabled")
|
self._enabled = config.get("enabled")
|
||||||
self._notify = config.get("notify")
|
self._notify = config.get("notify")
|
||||||
@ -115,6 +117,13 @@ class BrushFlow(_PluginBase):
|
|||||||
self._save_path = config.get("save_path")
|
self._save_path = config.get("save_path")
|
||||||
self._clear_task = config.get("clear_task")
|
self._clear_task = config.get("clear_task")
|
||||||
|
|
||||||
|
# 过滤掉已删除的站点
|
||||||
|
self._brushsites = [site.get("id") for site in self.sites.get_indexers() if
|
||||||
|
not site.get("public") and site.get("id") in self._brushsites]
|
||||||
|
|
||||||
|
# 保存配置
|
||||||
|
self.__update_config()
|
||||||
|
|
||||||
if self._clear_task:
|
if self._clear_task:
|
||||||
# 清除统计数据
|
# 清除统计数据
|
||||||
self.save_data("statistic", {})
|
self.save_data("statistic", {})
|
||||||
@ -1877,4 +1886,3 @@ class BrushFlow(_PluginBase):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(str(e))
|
print(str(e))
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user