From 73ad6dd0c43ed10333049b0898ab9a59ac9b2d44 Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Sat, 23 May 2020 14:40:50 +0200 Subject: [PATCH] Fix kobo sync (sync tags) --- cps/kobo.py | 2 +- test/Calibre-Web TestSummary.html | 68 +++++++++++++++---------------- 2 files changed, 34 insertions(+), 36 deletions(-) diff --git a/cps/kobo.py b/cps/kobo.py index 462e4ca1..97d55db0 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -613,7 +613,7 @@ def create_kobo_tag(shelf): "Type": "UserTag" } for book_shelf in shelf.books: - book = calibre_db.get_book_by_uuid(book_shelf.book_id) + book = calibre_db.get_book(book_shelf.book_id) if not book: log.info(u"Book (id: %s) in BookShelf (id: %s) not found in book database", book_shelf.book_id, shelf.id) continue diff --git a/test/Calibre-Web TestSummary.html b/test/Calibre-Web TestSummary.html index 58884fcf..1feb255d 100755 --- a/test/Calibre-Web TestSummary.html +++ b/test/Calibre-Web TestSummary.html @@ -36,17 +36,17 @@
-

Start Time: 2020-05-22 18:17:02

+

Start Time: 2020-05-23 12:52:51

-

Stop Time: 2020-05-22 19:14:53

+

Stop Time: 2020-05-23 13:50:07

-

Duration: 48:49 min

+

Duration: 48:28 min

@@ -442,8 +442,8 @@ test_edit_additional_books.test_edit_additional_books 3 - 1 2 + 1 0 0 @@ -480,9 +480,9 @@
Traceback (most recent call last):
   File "/home/matthias/Entwicklung/calibre-web-test/test/test_edit_additional_books.py", line 88, in test_upload_metadata_cbt
-    self.assertEqual('Test 执book', details['title'])
-AssertionError: 'Test 执book' != 'book'
-- Test 执book
+    self.assertEqual('Test 执 to', details['title'])
+AssertionError: 'Test 执 to' != 'book'
+- Test 执 to
 + book
@@ -493,33 +493,11 @@ AssertionError: 'Test 执book' != 'book' - +
test_upload_metadate_cbr
- -
- FAIL -
- - - - + PASS @@ -1134,8 +1112,8 @@ AssertionError: False is not true : Browser-Cache Problem: Old Cover is displaye test_kobo_sync.test_kobo_sync 8 - 8 - 0 + 7 + 1 0 0 @@ -1190,11 +1168,31 @@ AssertionError: False is not true : Browser-Cache Problem: Old Cover is displaye - +
test_sync_shelf
- PASS + +
+ FAIL +
+ + + +