fix db session

This commit is contained in:
jxxghp
2023-10-18 18:30:09 +08:00
parent 68e16d18fe
commit 2e4536edb6
10 changed files with 48 additions and 48 deletions

View File

@ -250,7 +250,7 @@ class ChineseSubFinder(_PluginBase):
logger.warn("ChineseSubFinder下载字幕出错%s" % message)
else:
logger.info("ChineseSubFinder任务添加成功%s" % job_id)
else:
elif res.status_code != 200:
logger.warn(f"ChineseSubFinder调用出错{res.status_code} - {res.reason}")
except Exception as e:
logger.error("连接ChineseSubFinder出错" + str(e))

View File

@ -577,9 +577,9 @@ class DirMonitor(_PluginBase):
"""
从表中获取download_hash避免连接下载器
"""
downloadHis = self.downloadhis.get_file_by_fullpath(src)
if downloadHis:
return downloadHis.download_hash
download_file = self.downloadhis.get_file_by_fullpath(src)
if download_file:
return download_file.download_hash
return None
def get_state(self) -> bool: