Merge pull request #28 from thsrite/main
This commit is contained in:
commit
ec62be7783
@ -75,7 +75,7 @@ class AutoSignIn(_PluginBase):
|
||||
self._enabled = config.get("enabled")
|
||||
self._cron = config.get("cron")
|
||||
self._notify = config.get("notify")
|
||||
self._queue_cnt = config.get("queue_cnt")
|
||||
self._queue_cnt = config.get("queue_cnt") or 5
|
||||
self._sign_sites = config.get("sign_sites")
|
||||
|
||||
# 加载模块
|
||||
@ -385,7 +385,7 @@ class AutoSignIn(_PluginBase):
|
||||
|
||||
# 执行签到
|
||||
logger.info("开始执行签到任务 ...")
|
||||
with ThreadPool(min(len(sign_sites), self._queue_cnt)) as p:
|
||||
with ThreadPool(min(len(sign_sites), int(self._queue_cnt))) as p:
|
||||
status = p.map(self.signin_site, sign_sites)
|
||||
|
||||
if status:
|
||||
|
@ -88,6 +88,7 @@ class DirMonitor(_PluginBase):
|
||||
# 停止现有任务
|
||||
self.stop_service()
|
||||
|
||||
if self._enabled:
|
||||
# 启动任务
|
||||
monitor_dirs = self._monitor_dirs.split("\n")
|
||||
if not monitor_dirs:
|
||||
|
@ -500,7 +500,6 @@ class MediaSyncDel(_PluginBase):
|
||||
mtype = match[1]
|
||||
name = match[2]
|
||||
path = match[3]
|
||||
mid = match[4]
|
||||
|
||||
year = None
|
||||
year_pattern = r'\(\d+\)'
|
||||
@ -542,7 +541,6 @@ class MediaSyncDel(_PluginBase):
|
||||
"name": name,
|
||||
"year": year,
|
||||
"path": path,
|
||||
"id": mid,
|
||||
"season": season,
|
||||
"episode": episode,
|
||||
}
|
||||
@ -571,7 +569,7 @@ class MediaSyncDel(_PluginBase):
|
||||
return []
|
||||
|
||||
# 正则解析删除的媒体信息
|
||||
pattern = r'(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}) Info App: Removing item from database, Type: (\w+), Name: (.*), Path: (.*), Id: (\d+)'
|
||||
pattern = r'\[(.*?)\].*?Removing item, Type: "(.*?)", Name: "(.*?)", Path: "(.*?)"'
|
||||
matches = re.findall(pattern, log_res.text)
|
||||
|
||||
del_medias = []
|
||||
@ -585,7 +583,6 @@ class MediaSyncDel(_PluginBase):
|
||||
mtype = match[1]
|
||||
name = match[2]
|
||||
path = match[3]
|
||||
mid = match[4]
|
||||
|
||||
year = None
|
||||
year_pattern = r'\(\d+\)'
|
||||
@ -627,7 +624,6 @@ class MediaSyncDel(_PluginBase):
|
||||
"name": name,
|
||||
"year": year,
|
||||
"path": path,
|
||||
"id": mid,
|
||||
"season": season,
|
||||
"episode": episode,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user