Update MgrCalibreDB.py, MgrCalibreUI.py, and 3 more files...

python - requirements.txt added
This commit is contained in:
2025-08-03 21:03:16 +09:00
parent d5f2d82bc9
commit 2c36327ae8
5 changed files with 98 additions and 11 deletions

View File

@@ -61,7 +61,7 @@ class MyApp(QMainWindow):
if False == os.path.exists(self.pathDB):
os.makedirs(self.pathDB, exist_ok=True)
self.pathLastCalibre = settings.value('LastCalibrePath', "~/캘리버 서재", type=str)
self.pathLastCalibre = settings.value('LastCalibrePath', "~/CalibreLibrary", type=str)
if False == os.path.exists(self.pathDB):
os.makedirs(self.pathDB, exist_ok=True)
@@ -100,8 +100,7 @@ class MyApp(QMainWindow):
self.DBPupil = MgrPupilColDB.MgrPupilColDB(pathPupilDB)
pathCalibreDB = os.path.join(self.pathLastCalibre, self.fileNameCallibreDB)
util.DbgOut(f"Loading Calibre DB from {pathCalibreDB}", True)
self.DBCalibre = MgrCalibreDB.MgrCalibreDB(pathCalibreDB)
self.LoadCalibreDB(pathCalibreDB)
#
def MakeUI_Left(self):
@@ -291,13 +290,17 @@ class MyApp(QMainWindow):
## metadata.db
def LoadCalibreDB(self, path:str ) -> None:
pathDB = os.path.join(path, "metadata.db")
pathDB = path
if True == os.path.isdir(path):
pathDB = os.path.join(path, "metadata.db")
print(f"LoadCalibreDB: {pathDB}")
if False == os.path.exists(pathDB):
util.DbgOut(f"Calibre DB not found: {pathDB}", True)
return
DB = MgrCalibreDB.MgrCalibreDB(pathDB)
listItems = DB.GetBookListforUI_ArcList()
self.DBCalibre = MgrCalibreDB.MgrCalibreDB(pathDB)
listItems = self.DBCalibre.GetBookListforUI_ArcList()
for item in listItems:
strID = item[4]
strTitle = item[0]