mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-28 08:55:51 +01:00
resort maximum_resort_levels tweak implemented
This commit is contained in:
parent
64f881f3a6
commit
6eaa75527b
2 changed files with 9 additions and 2 deletions
|
|
@ -114,3 +114,10 @@
|
|||
# Set the maximum number of tags to show per book in the content server
|
||||
max_content_server_tags_shown=5
|
||||
|
||||
|
||||
# Set the maximum number of sort 'levels' that calibre will use to resort the
|
||||
# library after certain operations such as searches or device insertion. Each
|
||||
# sort level adds a performance penalty. If the database is large (thousands of
|
||||
# books) the penalty might be noticeable. If you are not concerned about multi-
|
||||
# level sorts, and if you are seeing a slowdown, reduce the value of this tweak.
|
||||
maximum_resort_levels = 5
|
||||
|
|
@ -266,8 +266,8 @@ def refresh(self, reset=True):
|
|||
self.db.refresh(field=None)
|
||||
self.resort(reset=reset)
|
||||
|
||||
def resort(self, reset=True, history=5): # Bug report needed history=4 :)
|
||||
for col,ord in reversed(self.sort_history[:history]):
|
||||
def resort(self, reset=True):
|
||||
for col,ord in reversed(self.sort_history[:tweaks['maximum_resort_levels']]):
|
||||
try:
|
||||
col = self.column_map.index(col)
|
||||
except ValueError:
|
||||
|
|
|
|||
Loading…
Reference in a new issue