fix NoPayStation PSP parsing + detail-panel UnboundLocalError
- PSP_GAMES.tsv and PSX_GAMES.tsv use different headers (PSP adds Type/RAP columns, PSX adds Original Name). Parse the header row and map columns by name instead of hardcoding positions — PSP names were showing as 'Minis'/ 'PC Engine' (the Type column) with broken download URLs. - GameDetailsPanel.set_item referenced is_ps1 before it was assigned, raising UnboundLocalError and leaving the detail panel stale.
This commit is contained in:
+1
-1
@@ -682,13 +682,13 @@ class GameDetailsPanel(QWidget):
|
||||
self.system = item.get("system")
|
||||
self._ps1_kind = item.get("ps1_kind")
|
||||
path = item.get("path") or ""
|
||||
is_ps1 = item.get("system") == "ps1"
|
||||
if (is_ps1 and item.get("ps1_kind") == "eboot") or item.get("psp_kind") == "eboot":
|
||||
self.filename.setText(Path(path).parent.name if path else "")
|
||||
else:
|
||||
self.filename.setText(Path(path).name if path else "")
|
||||
self.filename.setToolTip(path)
|
||||
self.filename.setVisible(bool(path))
|
||||
is_ps1 = item.get("system") == "ps1"
|
||||
is_ps1_disc = is_ps1 and item.get("ps1_kind") == "disc"
|
||||
self.play_btn.setEnabled(
|
||||
(item.get("system") == "games" and bool(path) and Path(path).suffix.lower() == ".iso")
|
||||
|
||||
Reference in New Issue
Block a user