ps1: show only pending discs in the PS1 tab
Converted games already appear in the Library tab, so the PS1 tab now lists only raw discs that still need converting. Auto-selects the first pending disc so the preview loads immediately.
This commit is contained in:
+9
-6
@@ -3387,7 +3387,7 @@ class Ps1PreviewWorker(QObject):
|
|||||||
|
|
||||||
|
|
||||||
class Ps1Page(QWidget):
|
class Ps1Page(QWidget):
|
||||||
"""PS1 tab: list raw source discs, converted EBOOTs and PSN games."""
|
"""PS1 tab: list raw source discs that still need converting."""
|
||||||
|
|
||||||
convert_requested = Signal(dict)
|
convert_requested = Signal(dict)
|
||||||
|
|
||||||
@@ -3537,16 +3537,19 @@ class Ps1Page(QWidget):
|
|||||||
self._thread.start()
|
self._thread.start()
|
||||||
|
|
||||||
def _on_results(self, entries):
|
def _on_results(self, entries):
|
||||||
|
# Only show discs that still need converting; converted games already
|
||||||
|
# appear in the Library tab.
|
||||||
|
entries = [e for e in entries if e["kind"] == "disc" and e.get("status") != "converted"]
|
||||||
self._entries = entries
|
self._entries = entries
|
||||||
self.table.setRowCount(len(entries))
|
self.table.setRowCount(len(entries))
|
||||||
for row, e in enumerate(entries):
|
for row, e in enumerate(entries):
|
||||||
kind = "Disc" if e["kind"] == "disc" else "EBOOT"
|
self.table.setItem(row, 0, QTableWidgetItem("Disc"))
|
||||||
self.table.setItem(row, 0, QTableWidgetItem(kind))
|
|
||||||
self.table.setItem(row, 1, QTableWidgetItem(e["name"]))
|
self.table.setItem(row, 1, QTableWidgetItem(e["name"]))
|
||||||
self.table.setItem(row, 2, QTableWidgetItem(e.get("serial") or ""))
|
self.table.setItem(row, 2, QTableWidgetItem(e.get("serial") or ""))
|
||||||
self.table.setItem(row, 3, QTableWidgetItem(e.get("status") or "pending"))
|
self.table.setItem(row, 3, QTableWidgetItem("pending"))
|
||||||
pending = sum(1 for e in entries if e["kind"] == "disc" and e["status"] != "converted")
|
self.status.setText(f"{len(entries)} disc(s) ready to convert")
|
||||||
self.status.setText(f"{len(entries)} item(s) — {pending} ready to convert")
|
if entries:
|
||||||
|
self.table.selectRow(0)
|
||||||
|
|
||||||
def _on_failed(self, message):
|
def _on_failed(self, message):
|
||||||
self.status.setText(f"PS1 scan failed: {message}")
|
self.status.setText(f"PS1 scan failed: {message}")
|
||||||
|
|||||||
Reference in New Issue
Block a user