Store: Don't add duplicate results to results.

This commit is contained in:
John Schember 2011-04-21 21:31:10 -04:00
parent 791e65fd00
commit 8c74aae44a
2 changed files with 15 additions and 11 deletions

View File

@ -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)

View File

@ -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