mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
fix(analysis): persist failed tracks and reconcile progress counts (#867)
* fix(analysis): persist failed-track suppression and reduce aggressive polling Persist unsupported/broken analysis tracks as failed entries and expose them in Settings with track metadata, export, and targeted rescan actions. Also make aggressive-mode completion checks cheap by gating re-entry on live track-count changes with a startup seed and 5-minute recheck cadence. * fix(analysis): mark unsupported decode tracks as failed in cpu-seed When full-seed falls back to waveform-only (no EBU loudness) or enrichment decode fails, persist analysis_track status as failed so aggressive backfill does not requeue the same unsupported tracks indefinitely. * fix(analysis): reconcile legacy ready tracks without loudness Auto-mark legacy ready tracks that only miss loudness as failed during needs-work checks so analysis progress converges instead of staying permanently pending. * docs(changelog): add failed-analysis recovery notes for PR 867 Document persistent failed-track handling, analytics strategy controls, and low-cost aggressive-mode recheck behavior in the 1.47.0 changelog. * fix(i18n): align settings locale coverage across all languages Sync missing Settings keys for all shipped locales and replace recent English fallbacks with localized strings so analytics and backup UI text stays consistent outside en/ru.
This commit is contained in:
@@ -11,6 +11,7 @@ use symphonia::core::meta::MetadataOptions;
|
||||
use symphonia::core::probe::Hint;
|
||||
use symphonia::core::units::Time;
|
||||
use tauri::{Manager, Runtime};
|
||||
use psysonic_core::track_enrichment::TrackEnrichmentOutcome;
|
||||
|
||||
use crate::analysis_perf::AnalysisSeedTimings;
|
||||
|
||||
@@ -78,12 +79,32 @@ pub fn seed_from_bytes_execute<R: Runtime>(
|
||||
}
|
||||
let bpm_ms = if !server_id.is_empty() {
|
||||
let bpm_started = Instant::now();
|
||||
let _ = crate::track_enrichment::run_track_enrichment_if_needed(
|
||||
let enrichment_outcome = crate::track_enrichment::run_track_enrichment_if_needed(
|
||||
app,
|
||||
server_id,
|
||||
track_id,
|
||||
bytes,
|
||||
);
|
||||
if matches!(enrichment_outcome, TrackEnrichmentOutcome::Failed) {
|
||||
let key = TrackKey {
|
||||
server_id: server_id.to_string(),
|
||||
track_id: track_id.to_string(),
|
||||
md5_16kb: md5_16kb.clone(),
|
||||
};
|
||||
let _ = cache.touch_track_status(&key, "failed");
|
||||
}
|
||||
if matches!(outcome, SeedFromBytesOutcome::Upserted) {
|
||||
if let Ok(coverage) = cache.content_cache_coverage(server_id, track_id, &md5_16kb) {
|
||||
if !coverage.has_loudness {
|
||||
let key = TrackKey {
|
||||
server_id: server_id.to_string(),
|
||||
track_id: track_id.to_string(),
|
||||
md5_16kb: md5_16kb.clone(),
|
||||
};
|
||||
let _ = cache.touch_track_status(&key, "failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
bpm_started.elapsed().as_millis() as u64
|
||||
} else {
|
||||
0
|
||||
@@ -199,6 +220,7 @@ pub fn seed_from_bytes_into_cache(
|
||||
);
|
||||
}
|
||||
Err(e) => {
|
||||
let _ = cache.touch_track_status(&key, "failed");
|
||||
crate::app_deprintln!(
|
||||
"[analysis] full-track analysis failed track_id={} elapsed_ms={} err={}",
|
||||
track_id,
|
||||
|
||||
Reference in New Issue
Block a user