Add All filter to NoPayStation store source
This commit is contained in:
+4
-4
@@ -1860,7 +1860,7 @@ class StorePage(QWidget):
|
||||
self.source_combo.currentIndexChanged.connect(self._on_source_changed)
|
||||
bar.addWidget(self.source_combo)
|
||||
self.nps_type = QComboBox()
|
||||
self.nps_type.addItems(["PSP Games", "PS1 Classics", "PSP Themes", "PSP DLC"])
|
||||
self.nps_type.addItems(["All", "PSP Games", "PS1 Classics", "PSP Themes", "PSP DLC"])
|
||||
self.nps_type.setVisible(False)
|
||||
self.nps_type.currentIndexChanged.connect(self._on_nps_type_changed)
|
||||
bar.addWidget(self.nps_type)
|
||||
@@ -1972,7 +1972,7 @@ class StorePage(QWidget):
|
||||
if self.source_combo.currentIndex() == 1:
|
||||
return transfers.ArchiveOrgSource(self._archive_id, self._archive_sig, self._archive_user)
|
||||
if self.source_combo.currentIndex() == 3:
|
||||
ct = ("psp", "psx", "theme", "dlc")[self.nps_type.currentIndex()]
|
||||
ct = ("all", "psp", "psx", "theme", "dlc")[self.nps_type.currentIndex()]
|
||||
return transfers.NoPayStationSource(ct)
|
||||
return transfers.LocalShareSource(self._store_dir)
|
||||
|
||||
@@ -2057,7 +2057,7 @@ class StorePage(QWidget):
|
||||
self.status.setText("Fetching store from archive.org…")
|
||||
worker = RemoteStoreScanWorker(transfers.ArchiveOrgSource(self._archive_id, self._archive_sig, self._archive_user))
|
||||
elif self.source_combo.currentIndex() == 3: # NoPayStation
|
||||
ct = ("psp", "psx", "theme", "dlc")[self.nps_type.currentIndex()]
|
||||
ct = ("all", "psp", "psx", "theme", "dlc")[self.nps_type.currentIndex()]
|
||||
log.info("store: fetching NoPayStation %s list", ct)
|
||||
self.status.setText(f"Fetching NoPayStation ({ct.upper()})…")
|
||||
worker = RemoteStoreScanWorker(transfers.NoPayStationSource(ct, force=force))
|
||||
@@ -5000,7 +5000,7 @@ class MainWindow(QMainWindow):
|
||||
if not self._nps_dir:
|
||||
QMessageBox.warning(self, "No NPS output dir", "Set the NoPayStation output dir in Settings → Store.")
|
||||
return
|
||||
sub = {"psp": "PSP", "psx": "PSX", "theme": "THEME", "dlc": "DLC"}.get(src.content_type, "PSP")
|
||||
sub = {"psp": "PSP", "psx": "PSX", "theme": "THEME", "dlc": "DLC"}.get(it.get("content_type") or src.content_type, "PSP")
|
||||
dest_dir = Path(self._nps_dir) / sub
|
||||
kind = "nps-download"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user