Add sorting key for data

This commit is contained in:
Sambhav Kothari
2017-04-06 23:38:48 +05:30
parent b910d0cb72
commit 80ec5426bf

View File

@@ -143,7 +143,7 @@ class CoverArtThumbnail(ActiveLabel):
has_common_images = True
w, h, displacements = (128, 128, 20)
key = hash(tuple(sorted(self.data)) + (has_common_images,))
key = hash(tuple(sorted(self.data, key=lambda x: x.types_as_string())) + (has_common_images,))
try:
pixmap = self._pixmap_cache[key]
except KeyError: