From 1c1b9b2d80db08b9ca2f80927532f0a36a79c89a Mon Sep 17 00:00:00 2001 From: "koldo.aingeru" Date: Sun, 7 Jun 2026 09:46:01 +0200 Subject: [PATCH] better goodreads imports: - add books to did-not-finish from the recent dnf shelf on goodreads. - convert br to newlines on reviews. --- backend/app/services/data_import.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/app/services/data_import.py b/backend/app/services/data_import.py index 4e75371..9aef8eb 100644 --- a/backend/app/services/data_import.py +++ b/backend/app/services/data_import.py @@ -836,7 +836,10 @@ async def execute_import( }, "language": {"source": "", "transform": None}, "tags": {"source": "Bookshelves", "transform": None}, - "notes": {"source": "My Review", "transform": None}, + "notes": { + "source": "My Review", + "transform": "value.replace('
', '\n') if value else None", + }, "blurb": {"source": "", "transform": None}, "rating": { "source": "My Rating", @@ -846,7 +849,7 @@ async def execute_import( "source": "Exclusive Shelf", "transform": ( "shelf_map = {'to-read': 'want_to_read', " - "'currently-reading': 'currently_reading', 'read': 'read'}\n" + "'currently-reading': 'currently_reading', 'read': 'read', 'did-not-finish': 'did_not_finish'}\n" "status = shelf_map.get(value.strip().lower(), 'want_to_read')\n" "return status" ),