From 188b2e0164b3b183347d434a2601ff40d1463a4a Mon Sep 17 00:00:00 2001 From: hyugogirubato <65763543+hyugogirubato@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:10:26 +0200 Subject: [PATCH] New information fields in the XML --- cbz/constants.py | 24 ++++++++++++++++-------- cbz/models.py | 7 +++++++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/cbz/constants.py b/cbz/constants.py index 71d7e93..7ba0542 100644 --- a/cbz/constants.py +++ b/cbz/constants.py @@ -169,15 +169,23 @@ COMIC_FIELDS = { 'main_character_or_team': ('MainCharacterOrTeam', str), 'review': ('Review', str), 'language_iso': ('LanguageISO', LanguageISO), - 'community_rating': ('CommunityRating', Rating) + 'community_rating': ('CommunityRating', Rating), + 'added': ('Added', str), + 'released': ('Released', str), + 'file_size': ('FileSize', int), + 'file_modified_time': ('FileModifiedTime', str), + 'file_creation_time': ('FileCreationTime', str), + 'book_price': ('BookPrice', str), + 'custom_values_store': ('CustomValuesStore', str) } PAGE_FIELDS = { - 'type': ('Type', PageType), - 'double': ('DoublePage', bool), - 'key': ('Key', str), - 'bookmark': ('Bookmark', str), - 'image_size': ('ImageSize', int), - 'image_width': ('ImageWidth', int), - 'image_height': ('ImageHeight', int) + 'image': ('@Image', int), + 'type': ('@Type', PageType), + 'double': ('@DoublePage', bool), + 'key': ('@Key', str), + 'bookmark': ('@Bookmark', str), + 'image_size': ('@ImageSize', int), + 'image_width': ('@ImageWidth', int), + 'image_height': ('@ImageHeight', int) } diff --git a/cbz/models.py b/cbz/models.py index eaa6808..af10165 100644 --- a/cbz/models.py +++ b/cbz/models.py @@ -102,6 +102,13 @@ class ComicModel(BaseModel): review: str language_iso: LanguageISO community_rating: Rating + added: str + released: str + file_size: int + file_modified_time: str + file_creation_time: str + book_price: str + custom_values_store: str def __init__(self, **kwargs): """