mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Store: Don't add duplicate results to results.
This commit is contained in:
parent
791e65fd00
commit
8c74aae44a
@ -463,6 +463,7 @@ class Matches(QAbstractItemModel):
|
||||
self.reset()
|
||||
|
||||
def add_result(self, result, store_plugin):
|
||||
if result not in self.all_matches:
|
||||
self.layoutAboutToBeChanged.emit()
|
||||
self.all_matches.append(result)
|
||||
self.search_filter.add_search_result(result)
|
||||
|
@ -22,3 +22,6 @@ class SearchResult(object):
|
||||
self.detail_item = ''
|
||||
self.drm = None
|
||||
self.formats = ''
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.title == other.title and self.author == other.author and self.store_name == other.store_name
|
||||
|
Loading…
x
Reference in New Issue
Block a user