diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 2412eef..c8420bc 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2740,9 +2740,9 @@ dependencies = [ [[package]] name = "lofty" -version = "0.22.4" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca260c51a9c71f823fbfd2e6fbc8eb2ee09834b98c00763d877ca8bfa85cde3e" +checksum = "dec4feeff6c7d75093278133a06e827d7af6d2bfe20b0f331f9d10338a5ec7ca" dependencies = [ "byteorder", "data-encoding", @@ -2755,9 +2755,9 @@ dependencies = [ [[package]] name = "lofty_attr" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9983e64b2358522f745c1251924e3ab7252d55637e80f6a0a3de642d6a9efc" +checksum = "458ace39169e4b83c4f77ae3d42d5d1d11c422feef590219a97c973d3b524557" dependencies = [ "proc-macro2", "quote", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 20f5f2f..508db8c 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -60,7 +60,7 @@ chrono = { version = "0.4", features = ["serde"] } # Library scanning walkdir = "2" -lofty = "0.22" +lofty = "0.24" blake3 = "1" # Audio playback: symphonia decodes, cpal outputs, rubato resamples, diff --git a/src-tauri/src/commands/lyrics.rs b/src-tauri/src/commands/lyrics.rs index 2a658b0..0f6b7cd 100644 --- a/src-tauri/src/commands/lyrics.rs +++ b/src-tauri/src/commands/lyrics.rs @@ -116,13 +116,13 @@ fn read_embedded_lyrics(path: &Path) -> Option { let tag = tagged.primary_tag().or_else(|| tagged.first_tag())?; // ItemKey::Lyrics maps to the right key for every supported format. let raw = tag - .get_string(&ItemKey::Lyrics) + .get_string(ItemKey::Lyrics) .map(|s| s.to_string()) .or_else(|| { // Some MP3s store lyrics under a non-standard key — fall // back to the generic `lyrics()` accessor when present. #[allow(deprecated)] - tag.get_string(&ItemKey::Description) + tag.get_string(ItemKey::Description) .filter(|s| s.lines().count() > 3) .map(|s| s.to_string()) })?; diff --git a/src-tauri/src/commands/scan.rs b/src-tauri/src/commands/scan.rs index f5258bd..5218603 100644 --- a/src-tauri/src/commands/scan.rs +++ b/src-tauri/src/commands/scan.rs @@ -205,12 +205,12 @@ fn extract_cover(tag: &Tag, artwork_dir: &Path) -> Option { /// `RATING` as plain text 0-100 which we rescale to 0-255. fn extract_rating(tag: &Tag) -> Option { if matches!(tag.tag_type(), TagType::Id3v2) { - if let Some(bytes) = tag.get_binary(&ItemKey::Popularimeter, false) { + if let Some(bytes) = tag.get_binary(ItemKey::Popularimeter, false) { let nul_pos = bytes.iter().position(|b| *b == 0)?; return bytes.get(nul_pos + 1).copied(); } } - if let Some(text) = tag.get_string(&ItemKey::Popularimeter) { + if let Some(text) = tag.get_string(ItemKey::Popularimeter) { let trimmed = text.trim(); if let Ok(val) = trimmed.parse::() { let clamped = val.min(100); @@ -226,7 +226,7 @@ fn extract_rating(tag: &Tag) -> Option { /// coalesced to `None` so the UI's "—" placeholder kicks in /// instead of a blank cell. fn extract_musical_key(tag: &Tag) -> Option { - let raw = tag.get_string(&ItemKey::InitialKey)?; + let raw = tag.get_string(ItemKey::InitialKey)?; let trimmed = raw.trim(); if trimmed.is_empty() { None @@ -277,7 +277,7 @@ fn extract_file(path: &Path, artwork_dir: &Path) -> Result