mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-28 18:04:33 +02:00
Report chapter_error in custom error column and marked (when configured).
This commit is contained in:
parent
37cdec2f27
commit
c84f9f2895
2 changed files with 11 additions and 6 deletions
|
|
@ -537,12 +537,12 @@ class BasicTab(QWidget):
|
|||
groupbox.setLayout(self.l)
|
||||
|
||||
self.mark = QCheckBox(_("Mark added/updated books when finished?"),self)
|
||||
self.mark.setToolTip(_("Mark added/updated books when finished. Use with option below.\nYou can also manually search for 'marked:fff_success'.\n'marked:fff_failed' is also available, or search 'marked:fff' for both."))
|
||||
self.mark.setToolTip(_("Mark added/updated books when finished. Use with option below.\nYou can also manually search for 'marked:fff_success'.\n'marked:fff_failed' and 'marked:fff_chapter_error' are also available, or search 'marked:fff' for all."))
|
||||
self.mark.setChecked(prefs['mark'])
|
||||
self.l.addWidget(self.mark)
|
||||
|
||||
self.showmarked = QCheckBox(_("Show Marked books when finished?"),self)
|
||||
self.showmarked.setToolTip(_("Show Marked added/updated books only when finished.\nYou can also manually search for 'marked:fff_success'.\n'marked:fff_failed' is also available, or search 'marked:fff' for both."))
|
||||
self.showmarked.setToolTip(_("Show Marked added/updated books only when finished.\nYou can also manually search for 'marked:fff_success'.\n'marked:fff_failed' and 'marked:fff_chapter_error' are also available, or search 'marked:fff' for all."))
|
||||
self.showmarked.setChecked(prefs['showmarked'])
|
||||
self.l.addWidget(self.showmarked)
|
||||
|
||||
|
|
|
|||
|
|
@ -1775,6 +1775,9 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
failed_list = [ x for x in book_list if not x['good'] ]
|
||||
failed_ids = [ x['calibre_id'] for x in failed_list ]
|
||||
|
||||
chapter_error_list = [ x for x in book_list if 'chapter_error_count' in x ]
|
||||
chapter_error_ids = [ x['calibre_id'] for x in chapter_error_list ]
|
||||
|
||||
if all_not_calonly_ids and \
|
||||
(prefs['addtolists'] or prefs['addtoreadlists']):
|
||||
self.update_reading_lists(all_not_calonly_ids,add=True)
|
||||
|
|
@ -1796,11 +1799,13 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
if showlist and prefs['mark']: # don't use with anthology
|
||||
db = self.gui.current_db
|
||||
marked_ids = dict()
|
||||
marked_text = "fff_success"
|
||||
marked_text = "fff"
|
||||
for index, book_id in enumerate(all_ids):
|
||||
marked_ids[book_id] = '%s_%04d' % (marked_text, index)
|
||||
marked_ids[book_id] = '%s_success_%04d' % (marked_text, index)
|
||||
for index, book_id in enumerate(failed_ids):
|
||||
marked_ids[book_id] = 'fff_failed_%04d' % index
|
||||
marked_ids[book_id] = '%s_failed_%04d' % (marked_text, index)
|
||||
for index, book_id in enumerate(chapter_error_ids):
|
||||
marked_ids[book_id] = '%s_chapter_error_%04d' % (marked_text, index)
|
||||
# Mark the results in our database
|
||||
db.set_marked_ids(marked_ids)
|
||||
|
||||
|
|
@ -2072,7 +2077,7 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
|
||||
def update_error_column_loop(self,book,db=None,errorcol_label=None,lastcheckedcol_label=None):
|
||||
if book['calibre_id'] and errorcol_label:
|
||||
if not book['good'] and (book['showerror'] or prefs['save_all_errors']):
|
||||
if (not book['good'] or 'chapter_error_count' in book) and (book['showerror'] or prefs['save_all_errors']):
|
||||
logger.debug("update_error_column_loop bad %s %s %s"%(book['title'],book['url'],book['comment']))
|
||||
self.set_custom(db, book['calibre_id'], 'comment', book['comment'], label=errorcol_label, commit=True)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue