Update MgrCalibreDB.py, MgrCalibreUI.py, and 3 more files...
python - requirements.txt added
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user