Restructure Settings nav, modernize import page, dedup/genres UX polish
Settings is now one top-nav entry with Credentials and Jobs as sidebar sub-pages (jobs moved from /jobs to /settings/jobs). Manual import page replaces the bare file input and free-text filename field with a drag-drop dropzone and a proper file-picker table. Genres page drops the "force" checkbox for two explicit buttons (Preview / Fix genres now). Dedup's "Scan now" runs both the file-naming and acoustic passes together, and the table labels which pass caught each candidate instead of showing the raw pass name. .btn-ghost gets a visible border so it reads as a real button next to Delete/Danger actions instead of looking unaligned. Job names throughout the UI are now human-readable instead of raw job_key strings. Also includes the fpcalc exit-code fix from earlier (fingerprint index was discarding valid fingerprints on files with a benign decode warning).
This commit is contained in:
@@ -65,7 +65,14 @@ def enumerate_library() -> list[tuple[int, str]]:
|
||||
|
||||
|
||||
def fpcalc(host_path: str) -> tuple[int, str] | None:
|
||||
"""Run fpcalc -raw on a file. Returns (duration_seconds, fingerprint_csv)."""
|
||||
"""Run fpcalc -raw on a file. Returns (duration_seconds, fingerprint_csv).
|
||||
|
||||
fpcalc's exit code is not a reliable success signal: it exits non-zero
|
||||
(commonly 3) on a benign trailing-frame decode warning -- seen a lot on
|
||||
game-soundtrack rips with a slightly non-conformant tail -- while still
|
||||
printing a perfectly usable FINGERPRINT line. Whether a fingerprint was
|
||||
actually produced is the real signal, checked below; the exit code is
|
||||
ignored entirely."""
|
||||
try:
|
||||
proc = subprocess.run(
|
||||
["fpcalc", "-raw", host_path],
|
||||
@@ -75,8 +82,6 @@ def fpcalc(host_path: str) -> tuple[int, str] | None:
|
||||
)
|
||||
except (subprocess.TimeoutExpired, FileNotFoundError):
|
||||
return None
|
||||
if proc.returncode != 0:
|
||||
return None
|
||||
duration = 0
|
||||
fingerprint = ""
|
||||
for line in proc.stdout.splitlines():
|
||||
|
||||
Reference in New Issue
Block a user