mirror of
https://github.com/Leseratte10/acsm-calibre-plugin.git
synced 2024-12-22 17:29:56 +06:00
Fix all the bugs added with the last commit
This commit is contained in:
parent
6c94e7237d
commit
81da7bd6f9
@ -134,6 +134,7 @@ class ACSMInput(FileTypePlugin):
|
|||||||
|
|
||||||
|
|
||||||
# If the old DeACSM plugin still exists, rename it to BAK or something so it doesn't load.
|
# If the old DeACSM plugin still exists, rename it to BAK or something so it doesn't load.
|
||||||
|
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"))
|
os.rename(os.path.join(self.pluginsdir, "DeACSM.zip"), os.path.join(self.pluginsdir, "DeACSM.BAK"))
|
||||||
|
|
||||||
# Make sure the GUI extension is loaded:
|
# Make sure the GUI extension is loaded:
|
||||||
|
@ -152,7 +152,7 @@ class ConfigWidget(QWidget):
|
|||||||
|
|
||||||
# First remove all overdue books from the loan list,
|
# First remove all overdue books from the loan list,
|
||||||
# to determine if we should enable the button.
|
# 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):
|
if (len(self.tempdeacsmprefs["list_of_rented_books"]) == 0):
|
||||||
self.button_rented_books.setText(_("No loaned books available"))
|
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_OLD = os.path.join("plugins", "deacsm.json")
|
||||||
JSON_PATH = os.path.join("plugins", "ACSMInput", "ACSMInput.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.
|
# If the file exists in the old location, use that.
|
||||||
JSON_PATH = JSON_PATH_OLD
|
JSON_PATH = JSON_PATH_OLD
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ class ACSMInput_Prefs():
|
|||||||
self.__pluginsdir = os.path.join(config_dir,"plugins")
|
self.__pluginsdir = os.path.join(config_dir,"plugins")
|
||||||
|
|
||||||
success = False
|
success = False
|
||||||
for f in ["ACSMInput", "DeACSM"]:
|
for f in ["DeACSM", "ACSMInput"]:
|
||||||
self.__maindir = os.path.join(self.__pluginsdir, f)
|
self.__maindir = os.path.join(self.__pluginsdir, f)
|
||||||
self.__accountdir = os.path.join(self.__maindir,"account")
|
self.__accountdir = os.path.join(self.__maindir,"account")
|
||||||
if os.path.exists(self.__accountdir):
|
if os.path.exists(self.__accountdir):
|
||||||
|
Loading…
Reference in New Issue
Block a user