From 195e581aefb8363c075ee98c213afc5690b08f9a Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Sat, 15 Apr 2017 18:18:33 +0200 Subject: [PATCH] Missing file for deletion of books --- cps/helper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cps/helper.py b/cps/helper.py index 8522d336..4c9606c5 100755 --- a/cps/helper.py +++ b/cps/helper.py @@ -273,6 +273,9 @@ def get_sorted_author(value): value2 = value[-1] + ", " + " ".join(value[:-1]) return value2 +def delete_book(book, calibrepath): + path = os.path.join(calibrepath, book.path)#.replace('/',os.path.sep)).replace('\\',os.path.sep) + shutil.rmtree(path, ignore_errors=True) def update_dir_stucture(book_id, calibrepath): db.session.connection().connection.connection.create_function("title_sort", 1, db.title_sort)