fix(acoustid): distinguish unverified-quarantine from mismatch + gate unverified tab on require_verified
- pipeline: use trigger='acoustid_unverified' (not 'acoustid') when require_verified=ON rejects an unconfirmed track — quarantine badge now shows "ACOUSTID UNVERIFIED" instead of "ACOUSTID MISMATCH" - web_server: /api/verification/config now also returns require_verified - pages-extra: collapse the Unverified sub-view to quarantine-only when require_verified=true (same path as acoustid_enabled=false); new trigger entry in _VERIF_QUAR_TRIGGERS for acoustid_unverified Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b42ce3e0ca
commit
e8cc7ca2c8
3 changed files with 9 additions and 3 deletions
|
|
@ -529,7 +529,7 @@ def post_process_matched_download(context_key, context, file_path, runtime, meta
|
||||||
context,
|
context,
|
||||||
verification_msg,
|
verification_msg,
|
||||||
automation_engine,
|
automation_engine,
|
||||||
trigger='acoustid',
|
trigger='acoustid_unverified' if _skip_as_fail else 'acoustid',
|
||||||
)
|
)
|
||||||
_mark_task_quarantined(context, quarantine_path)
|
_mark_task_quarantined(context, quarantine_path)
|
||||||
logger.error(f"File quarantined due to verification failure: {quarantine_path}")
|
logger.error(f"File quarantined due to verification failure: {quarantine_path}")
|
||||||
|
|
|
||||||
|
|
@ -7783,7 +7783,8 @@ def get_verification_config():
|
||||||
queue collapses to quarantine-only in the UI."""
|
queue collapses to quarantine-only in the UI."""
|
||||||
try:
|
try:
|
||||||
enabled = bool(config_manager.get('acoustid.enabled', False))
|
enabled = bool(config_manager.get('acoustid.enabled', False))
|
||||||
return jsonify({"success": True, "acoustid_enabled": enabled})
|
require_verified = bool(config_manager.get('acoustid.require_verified', False))
|
||||||
|
return jsonify({"success": True, "acoustid_enabled": enabled, "require_verified": require_verified})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return jsonify({"success": True, "acoustid_enabled": True, "error": str(e)})
|
return jsonify({"success": True, "acoustid_enabled": True, "error": str(e)})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2619,6 +2619,10 @@ async function _verifLoadConfig() {
|
||||||
const r = await fetch('/api/verification/config');
|
const r = await fetch('/api/verification/config');
|
||||||
const d = await r.json();
|
const d = await r.json();
|
||||||
_verifAcoustidEnabled = !!(d && d.acoustid_enabled);
|
_verifAcoustidEnabled = !!(d && d.acoustid_enabled);
|
||||||
|
// When require_verified is on, nothing ever lands in the library as
|
||||||
|
// "unverified" — unconfirmed tracks go straight to quarantine instead.
|
||||||
|
// Collapse the sub-view to quarantine-only just like the no-AcoustID case.
|
||||||
|
if (_verifAcoustidEnabled && d && d.require_verified) _verifAcoustidEnabled = false;
|
||||||
} catch (e) { _verifAcoustidEnabled = true; }
|
} catch (e) { _verifAcoustidEnabled = true; }
|
||||||
_verifConfigLoading = false;
|
_verifConfigLoading = false;
|
||||||
if (_verifAcoustidEnabled === false) {
|
if (_verifAcoustidEnabled === false) {
|
||||||
|
|
@ -2626,7 +2630,7 @@ async function _verifLoadConfig() {
|
||||||
const pill = document.querySelector('.adl-pill[data-filter="unverified"]');
|
const pill = document.querySelector('.adl-pill[data-filter="unverified"]');
|
||||||
if (pill) {
|
if (pill) {
|
||||||
pill.textContent = '🛡 Quarantine';
|
pill.textContent = '🛡 Quarantine';
|
||||||
pill.title = 'Files that failed import checks and were NOT imported. (AcoustID is not configured, so there is no unverified review queue.)';
|
pill.title = 'Files that failed import checks and were NOT imported. (AcoustID is not configured or require-verified is on, so there is no unverified review queue.)';
|
||||||
}
|
}
|
||||||
if (_adlFilter === 'unverified') { _verifLoadQuarantine(true); _adlRender(); }
|
if (_adlFilter === 'unverified') { _verifLoadQuarantine(true); _adlRender(); }
|
||||||
}
|
}
|
||||||
|
|
@ -2655,6 +2659,7 @@ async function _verifLoadQuarantine(force) {
|
||||||
const _VERIF_QUAR_TRIGGERS = {
|
const _VERIF_QUAR_TRIGGERS = {
|
||||||
integrity: ['DURATION / INTEGRITY', 'verif-rb-int'],
|
integrity: ['DURATION / INTEGRITY', 'verif-rb-int'],
|
||||||
acoustid: ['ACOUSTID MISMATCH', 'verif-rb-force'],
|
acoustid: ['ACOUSTID MISMATCH', 'verif-rb-force'],
|
||||||
|
acoustid_unverified: ['ACOUSTID UNVERIFIED', 'verif-rb-unv'],
|
||||||
bit_depth: ['BIT DEPTH FILTER', 'verif-rb-int'],
|
bit_depth: ['BIT DEPTH FILTER', 'verif-rb-int'],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue