diff --git a/app/gui.py b/app/gui.py index 62f8dac..7db85a7 100644 --- a/app/gui.py +++ b/app/gui.py @@ -494,9 +494,17 @@ class CoverShowcase(QWidget): pm = QPixmap(str(path)) if pm.isNull(): return + # Match by identity when possible, falling back to release_id/system + # equality (the library may have been rebuilt while the scrape dialog + # was open, replacing the item objects). for i in range(self.list.count()): item = self.list.item(i) - if item.data(Qt.UserRole) is it: + data = item.data(Qt.UserRole) + if data is it or ( + data is not None + and data.get("release_id") == it.get("release_id") + and (data.get("system") or "games") == system + ): item.setIcon(self._fit_icon(pm)) if i in self.missing: self.missing.remove(i)