From de3f883992dc949a67c3053b2e555699b1da2476 Mon Sep 17 00:00:00 2001 From: James Armstong Date: Sat, 3 Aug 2024 11:52:28 -0700 Subject: [PATCH] Add change_archived_books() description --- cps/kobo_sync_status.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cps/kobo_sync_status.py b/cps/kobo_sync_status.py index ee9f0779c..94f1d073a 100644 --- a/cps/kobo_sync_status.py +++ b/cps/kobo_sync_status.py @@ -51,6 +51,8 @@ def remove_synced_book(book_id, all=False, session=None): ub.session_commit(_session=session) +# If state == none, it will toggle the archive state of the passed book_id. +# state = true archives it, state = false unarchives it def change_archived_books(book_id, state=None, message=None): archived_book = ub.session.query(ub.ArchivedBook).filter(and_(ub.ArchivedBook.user_id == int(current_user.id), ub.ArchivedBook.book_id == book_id)).first()