diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e4fc927d..705ad4b3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Some encoders will only write a BOM to the frame's description, rather than to every string in the frame. This was previously only supported in `SYLT` frames, and has been extended to `COMM` and `USLT`. - **Vorbis Comments**: Parse `TRACKNUMBER` with respect to `ParseOptions::implicit_conversions` ([issue](https://github.com/Serial-ATA/lofty-rs/issues/540)) ([PR](https://github.com/Serial-ATA/lofty-rs/issues/542)) +- **APE**: Fix disc number removal/writing ([issue](https://github.com/Serial-ATA/lofty-rs/issues/545)) ([PR](https://github.com/Serial-ATA/lofty-rs/pull/546)) ### Removed diff --git a/lofty/src/ape/tag/mod.rs b/lofty/src/ape/tag/mod.rs index bf779a0af..04ff62c24 100644 --- a/lofty/src/ape/tag/mod.rs +++ b/lofty/src/ape/tag/mod.rs @@ -285,11 +285,11 @@ impl Accessor for ApeTag { } fn remove_disk_total(&mut self) { - let existing_track_number = self.track(); + let existing_disk_number = self.disk(); self.remove("Disc"); - if let Some(track) = existing_track_number { - self.insert(ApeItem::text("Disc", track.to_string())); + if let Some(disk) = existing_disk_number { + self.insert(ApeItem::text("Disc", disk.to_string())); } } @@ -564,7 +564,7 @@ pub(crate) fn tagitems_into_ape(tag: &Tag) -> impl Iterator