Fix all the bugs added with the last commit

pull/66/head
Florian Bach 2 years ago
parent 6c94e7237d
commit 81da7bd6f9

@ -134,7 +134,8 @@ class ACSMInput(FileTypePlugin):
# If the old DeACSM plugin still exists, rename it to BAK or something so it doesn't load.
os.rename(os.path.join(self.pluginsdir, "DeACSM.zip"), os.path.join(self.pluginsdir, "DeACSM.BAK"))
if os.path.exists(os.path.join(self.pluginsdir, "DeACSM.zip")):
os.rename(os.path.join(self.pluginsdir, "DeACSM.zip"), os.path.join(self.pluginsdir, "DeACSM.BAK"))
# Make sure the GUI extension is loaded:
self.init_embedded_plugins()

@ -152,7 +152,7 @@ class ConfigWidget(QWidget):
# First remove all overdue books from the loan list,
# to determine if we should enable the button.
self.delete_overdue_books_from_loan_list()
RentedBooksDialog.remove_overdue_books_from_list()
if (len(self.tempdeacsmprefs["list_of_rented_books"]) == 0):
self.button_rented_books.setText(_("No loaned books available"))

@ -17,7 +17,7 @@ class ACSMInput_Prefs():
JSON_PATH_OLD = os.path.join("plugins", "deacsm.json")
JSON_PATH = os.path.join("plugins", "ACSMInput", "ACSMInput.json")
if os.path.exists(JSON_PATH_OLD) and not os.path.exists(JSON_PATH):
if os.path.exists(os.path.join(config_dir, JSON_PATH_OLD)):
# If the file exists in the old location, use that.
JSON_PATH = JSON_PATH_OLD
@ -39,7 +39,7 @@ class ACSMInput_Prefs():
self.__pluginsdir = os.path.join(config_dir,"plugins")
success = False
for f in ["ACSMInput", "DeACSM"]:
for f in ["DeACSM", "ACSMInput"]:
self.__maindir = os.path.join(self.__pluginsdir, f)
self.__accountdir = os.path.join(self.__maindir,"account")
if os.path.exists(self.__accountdir):

Loading…
Cancel
Save