From 9a8a1f75cab3c35e35b74ae2cc3b2969743193fa Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Mon, 1 Jun 2020 10:53:48 +0200 Subject: [PATCH] For for error unrar binary not found --- cps/admin.py | 7 ++++--- cps/helper.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 947d0087..84a94cba 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -683,9 +683,10 @@ def _configuration_update_helper(): reboot_required |= reboot # Rarfile Content configuration _config_string(to_save, "config_rarfile_location") - unrar_status = helper.check_unrar(config.config_rarfile_location) - if unrar_status: - return _configuration_result(unrar_status, gdriveError) + if "config_rarfile_location" in to_save: + unrar_status = helper.check_unrar(config.config_rarfile_location) + if unrar_status: + return _configuration_result(unrar_status, gdriveError) try: metadata_db = os.path.join(config.config_calibre_dir, "metadata.db") diff --git a/cps/helper.py b/cps/helper.py index ecb7180d..b9463416 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -778,7 +778,7 @@ def get_download_link(book_id, book_format, client): book_format = book_format.split(".")[0] book = calibre_db.get_filtered_book(book_id) if book: - data1 = data = calibre_db.get_book_format(book.id, book_format.upper()) + data1 = calibre_db.get_book_format(book.id, book_format.upper()) else: abort(404) if data1: