From 00f921490b6ee3f94303faaf603eaef53ac6d8ab Mon Sep 17 00:00:00 2001 From: Sophist <3001893+Sophist-UK@users.noreply.github.com> Date: Mon, 10 Feb 2020 08:39:35 +0000 Subject: [PATCH] Fix series sort after using clear_series If you have books with series and series_index > 1, and use bulk metadata to clear_series, then sort by series puts these at the bottom of the list because the series_index has not been reset to 1. --- src/calibre/gui2/dialogs/metadata_bulk.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/dialogs/metadata_bulk.py b/src/calibre/gui2/dialogs/metadata_bulk.py index 24d73f465e..42a6b7f960 100644 --- a/src/calibre/gui2/dialogs/metadata_bulk.py +++ b/src/calibre/gui2/dialogs/metadata_bulk.py @@ -369,6 +369,7 @@ class MyBlockingBusy(QDialog): # {{{ if args.clear_series: self.progress_next_step_range.emit(0) cache.set_field('series', {bid: '' for bid in self.ids}) + cache.set_field('series_index', {bid:1.0 for bid in self.ids}) self.progress_finished_cur_step.emit() if args.pubdate is not None: