Skip to content

Commit

Permalink
Merge pull request #151 from Aymendje/patch-1
Browse files Browse the repository at this point in the history
[bug] kindle_epub_fixer used as function name and as boolean
  • Loading branch information
crocodilestick authored Dec 20, 2024
2 parents f06bc09 + 81fe734 commit 2410cae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/ingest_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self, filepath: str):
self.target_format = self.cwa_settings['auto_convert_target_format']
self.ingest_ignored_formats = self.cwa_settings['auto_ingest_ignored_formats']
self.convert_ignored_formats = self.cwa_settings['auto_convert_ignored_formats']
self.kindle_epub_fixer = self.cwa_settings['kindle_epub_fixer']
self.is_kindle_epub_fixer = self.cwa_settings['kindle_epub_fixer']

self.supported_book_formats = {'azw', 'azw3', 'azw4', 'cbz', 'cbr', 'cb7', 'cbc', 'chm', 'djvu', 'docx', 'epub', 'fb2', 'fbz', 'html', 'htmlz', 'lit', 'lrf', 'mobi', 'odt', 'pdf', 'prc', 'pdb', 'pml', 'rb', 'rtf', 'snb', 'tcr', 'txtz', 'txt', 'kepub'}
self.hierarchy_of_success = {'epub', 'lit', 'mobi', 'azw', 'epub', 'azw3', 'fb2', 'fbz', 'azw4', 'prc', 'odt', 'lrf', 'pdb', 'cbz', 'pml', 'rb', 'cbr', 'cb7', 'cbc', 'chm', 'djvu', 'snb', 'tcr', 'pdf', 'docx', 'rtf', 'html', 'htmlz', 'txtz', 'txt'}
Expand Down Expand Up @@ -163,7 +163,7 @@ def delete_current_file(self) -> None:


def add_book_to_library(self, book_path:str) -> None:
if self.target_format == "epub" and self.kindle_epub_fixer:
if self.target_format == "epub" and self.is_kindle_epub_fixer:
self.kindle_epub_fixer(book_path)

print("[ingest-processor]: Importing new book to CWA...")
Expand Down

0 comments on commit 2410cae

Please sign in to comment.