This commit is contained in:
thsrite 2023-08-30 10:26:24 +08:00
parent f8221bb526
commit 85477a4bd3

View File

@ -69,7 +69,23 @@ class NAStoolSync(_PluginBase):
self.tr = Transmission()
# 读取sqlite数据
try:
gradedb = sqlite3.connect(self._nt_db_path)
except Exception as e:
self.update_config(
{
"transfer": False,
"clear": False,
"nt_db_path": None,
"path": self._path,
"downloader": self._downloader,
"site": self._site,
"supp": self._supp,
}
)
logger.error(f"无法打开数据库文件 {self._nt_db_path},请检查路径是否正确:{e}")
return
# 创建游标cursor来执行execute语句
cursor = gradedb.cursor()