Catch other common complete/in-progress statuses for calibre yes/no columns.

This commit is contained in:
Jim Miller 2017-05-15 19:32:47 -05:00
parent ad328e8a9d
commit dddb771d79

View file

@ -2051,9 +2051,11 @@ class FanFicFarePlugin(InterfaceAction):
self.set_custom(db, book_id, meta, num, label=label, commit=False)
elif coldef['datatype'] == 'bool' and meta.startswith('status-'):
if meta == 'status-C':
val = book['all_metadata']['status'] == 'Completed'
# Complete or Completed.
val = 'complete' in book['all_metadata']['status'].lower()
if meta == 'status-I':
val = book['all_metadata']['status'] == 'In-Progress'
# In-Progress, In Progress, or In progress.
val = 'progress' in book['all_metadata']['status'].lower()
self.set_custom(db, book_id, meta, val, label=label, commit=False)
configuration = None