Fine tuning koreader imports on real files

This commit is contained in:
2024-01-25 10:15:15 -05:00
parent 4ae13b3a1a
commit 3b65144b68
2 changed files with 87 additions and 40 deletions

View File

@ -185,6 +185,12 @@ class Book(LongPlayScrobblableMixin):
if data.get("pages") == None:
data.pop("pages")
if not isinstance(data.get("pages"), int):
logger.info(
f"Pages for {self} from OL expected to be int, but got {data.get('pages')}"
)
data.pop("pages")
# Pop this, so we can look it up later
cover_url = data.pop("cover_url", "")