Polish settings, add matching defaults, drop pkg2zip, externalize infra config
- Rework Settings tab into grouped sections - Add preferred-region matching and full-hash-by-default setting - Replace combo-box square arrow with a proper chevron - Fix UMD Refresh button (clicked bool was clearing the view) - Remove pkg2zip.exe fallback (pure-Python decryptor is the primary path) - Move LAN IP/share paths to .env; use example defaults in config
This commit is contained in:
+3
-7
@@ -476,11 +476,10 @@ class NoPayStationSource(Source):
|
||||
|
||||
label = "NoPayStation"
|
||||
|
||||
def __init__(self, content_type, tsv_url="", pkg2zip_path="", force=False):
|
||||
def __init__(self, content_type, tsv_url="", force=False):
|
||||
from . import nopaystation
|
||||
self.content_type = content_type
|
||||
self.tsv_url = tsv_url or nopaystation.tsv_url(content_type)
|
||||
self.pkg2zip = pkg2zip_path or ""
|
||||
self.force = force
|
||||
|
||||
def scan(self, root=None):
|
||||
@@ -492,10 +491,7 @@ class NoPayStationSource(Source):
|
||||
dest_dir = Path(dest_dir)
|
||||
dest_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# The bundled Python decryptor handles PSP/PSX/themes/DLC directly;
|
||||
# pkg2zip is only an optional fallback if a binary happens to be
|
||||
# configured (and only supports games/PSX).
|
||||
pkg2zip = nopaystation.find_pkg2zip(self.pkg2zip)
|
||||
# The bundled Python decryptor handles PSP/PSX/themes/DLC directly.
|
||||
title_id = item.get("title_id") or item.get("content_id") or ""
|
||||
pkg_name = re.sub(r"[^A-Za-z0-9_-]", "", title_id) or "pkg"
|
||||
tmp = Path(tempfile.mkdtemp(prefix="nps-download-"))
|
||||
@@ -505,7 +501,7 @@ class NoPayStationSource(Source):
|
||||
progress_cb("Downloading", 0.0, "")
|
||||
download_url(item["pkg_url"], pkg, None, progress_cb, cancel_event)
|
||||
kind_hint = self.content_type if self.content_type in ("theme", "dlc") else None
|
||||
folder = nopaystation.extract_pkg(pkg, title_id, dest_dir, pkg2zip,
|
||||
folder = nopaystation.extract_pkg(pkg, title_id, dest_dir,
|
||||
kind_hint, progress_cb, cancel_event)
|
||||
if self.content_type in ("theme", "dlc"):
|
||||
_write_sidecar(folder, item)
|
||||
|
||||
Reference in New Issue
Block a user