Skip to content

Commit

Permalink
Improvement: Warning user of epub conversion
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
0x6f677548 committed Feb 25, 2025
1 parent 113b14d commit e4c86ef
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion epubmg_interfaceplugin/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@ def metaguide_selection_format(
default_yes=False,
):
return
else:
if not question_dialog(
self.gui,
"Metaguiding will modify your files",
"This feature will modify your files by adding metaguiding to them. "
"The original file will be saved as ORIGINAL_format (ex: ORIGINAL_EPUB), and the new file will overwrite the original file. "
"Any previous ORIGINAL_format file will be overwritten and lost. "
"Please make sure to backup your library before using this feature.\n\n"
"Do you want to continue?",
show_copy_button=True,
default_yes=False,
):
return

action_text = "remove metaguiding" if remove_metaguiding else "add metaguiding"

Expand All @@ -137,7 +150,7 @@ def metaguide_selection_format(
)

try:
metaguiding.metaguide_epub_file(temp_file, temp_file)
metaguiding.metaguide_epub_file(temp_file, temp_file, remove_metaguiding = remove_metaguiding)
except Exception as e: # pylint: disable=broad-except
common.log.error(
"Error processing book id: %d, format: %s"
Expand Down

0 comments on commit e4c86ef

Please sign in to comment.