diff --git a/__init__.py b/__init__.py index 413b753..bd0d093 100644 --- a/__init__.py +++ b/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 from calibre.customize import InterfaceActionBase -VERSION = (3, 7, 1) +VERSION = (3, 7, 2) class WordDumbDumb(InterfaceActionBase): diff --git a/metadata.py b/metadata.py index ba3bd92..5a391e6 100644 --- a/metadata.py +++ b/metadata.py @@ -62,9 +62,9 @@ def get_asin(book_path, book_fmt): else: with open(book_path, 'rb') as f: mu = MetadataUpdater(f) - if (asin := mu.original_exth_records.get(113, None)) is None: - asin = mu.original_exth_records.get(504, None) - return asin.decode('utf-8') + if (asin := mu.original_exth_records.get(113)) is None: + asin = mu.original_exth_records.get(504) + return asin.decode('utf-8') if asin else None return None