Skip to content

Commit

Permalink
Fix for collision issue with translations and email direct d/l.
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmXinu committed Jun 4, 2020
1 parent 37bc54f commit 54409dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions calibre-plugin/fff_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
LoopProgressDialog, UserPassDialog, AboutDialog, CollectURLDialog,
RejectListDialog, EmailPassDialog,
OVERWRITE, OVERWRITEALWAYS, UPDATE, UPDATEALWAYS, ADDNEW, SKIP, CALIBREONLY,
CALIBREONLYSAVECOL,
CALIBREONLYSAVECOL, save_collisions,
NotGoingToDownload, RejectUrlEntry )

# because calibre immediately transforms html into zip and don't want
Expand Down Expand Up @@ -515,7 +515,8 @@ def get_urls_from_imap_menu(self):
if url_list:
self.prep_downloads({
'fileform': prefs['fileform'],
'collision': prefs['collision'],
# save_collisions==convert from save value to local lang value
'collision': save_collisions[prefs['collision']],
'updatemeta': prefs['updatemeta'],
'bgmeta': False,
'updateepubcover': prefs['updateepubcover'],
Expand Down
4 changes: 4 additions & 0 deletions calibre-plugin/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ def do_download_for_worker(book,options,merge,notification=lambda x,y:x):
book['all_metadata'] = story.getAllMetadata(removeallentities=True)
if options['savemetacol'] != '':
book['savemetacol'] = story.dump_html_metadata()
else:
## Shouldn't ever get here, but hey, it happened once
## before with prefs['collision']
raise Exception("Impossible state reached -- Book: %s:\nOptions:%s:"%(book,options))

if options['do_wordcount'] == SAVE_YES or (
options['do_wordcount'] == SAVE_YES_UNLESS_SITE and not story.getMetadataRaw('numWords') ):
Expand Down

0 comments on commit 54409dd

Please sign in to comment.