mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-28 19:56:40 +01:00
Make 'Update Calibre Only' add a new book if no matching book found.
This commit is contained in:
parent
949de85150
commit
59d0040e64
1 changed files with 5 additions and 2 deletions
|
|
@ -506,8 +506,11 @@ make_firstimage_cover:true
|
|||
if len(identicalbooks) > 1:
|
||||
raise NotGoingToDownload("More than one identical book--can't tell which to update/overwrite.","minusminus.png")
|
||||
|
||||
## changed: add new book when CALIBREONLY if none found.
|
||||
if collision == CALIBREONLY and not identicalbooks:
|
||||
raise NotGoingToDownload("Not updating Calibre Metadata, no existing book to update.","search_delete_saved.png")
|
||||
collision = ADDNEW
|
||||
options['collision'] = ADDNEW
|
||||
# raise NotGoingToDownload("Not updating Calibre Metadata, no existing book to update.","search_delete_saved.png")
|
||||
|
||||
if len(identicalbooks)>0:
|
||||
book_id = identicalbooks.pop()
|
||||
|
|
@ -515,7 +518,7 @@ make_firstimage_cover:true
|
|||
book['icon'] = 'edit-redo.png'
|
||||
|
||||
if book_id != None and collision != ADDNEW:
|
||||
if options['collision'] in (CALIBREONLY):
|
||||
if collision in (CALIBREONLY):
|
||||
book['comment'] = 'Metadata collected.'
|
||||
# don't need temp file created below.
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue