mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Metadata download dialog: Fix selected cover being changed when covers are re-sorted after download completes
This commit is contained in:
parent
e606618d04
commit
8c94504236
@ -678,11 +678,12 @@ class CoversModel(QAbstractListModel): # {{{
|
||||
good = []
|
||||
pmap = {}
|
||||
dcovers = sorted(self.covers[1:], key=self.cover_keygen, reverse=True)
|
||||
cmap = {x:self.covers.index(x) for x in self.covers}
|
||||
for i, x in enumerate(self.covers[0:1] + dcovers):
|
||||
if not x[-1]:
|
||||
good.append(x)
|
||||
if i > 0:
|
||||
plugin = self.plugin_for_index(i)
|
||||
plugin = self.plugin_for_index(cmap[x])
|
||||
pmap[plugin] = len(good) - 1
|
||||
self.covers = good
|
||||
self.plugin_map = pmap
|
||||
|
Loading…
x
Reference in New Issue
Block a user