From 952ac06cdb4eeb87f8d1bc7ce8bd1b145dec05fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 14:10:07 +0000 Subject: [PATCH 1/2] chore: bump lofty from 0.22.4 to 0.24.0 in /src-tauri Bumps [lofty](https://github.com/Serial-ATA/lofty-rs) from 0.22.4 to 0.24.0. - [Release notes](https://github.com/Serial-ATA/lofty-rs/releases) - [Changelog](https://github.com/Serial-ATA/lofty-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/Serial-ATA/lofty-rs/compare/0.22.4...0.24.0) --- updated-dependencies: - dependency-name: lofty dependency-version: 0.24.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- src-tauri/Cargo.lock | 8 ++++---- src-tauri/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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, From c1313e3d522255f561bde79ca58a7595a4c80f7d Mon Sep 17 00:00:00 2001 From: InstaZDLL Date: Thu, 7 May 2026 08:03:31 +0200 Subject: [PATCH 2/2] fix(scan): port tag accessors to lofty 0.24 API `Tag::get_string`/`get_binary` now take `ItemKey` by value, and `Accessor::year()` was replaced by `date()` returning `Timestamp`. --- src-tauri/src/commands/lyrics.rs | 4 ++-- src-tauri/src/commands/scan.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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