From 8edb22a027c938b912751295a14a54308b376a40 Mon Sep 17 00:00:00 2001 From: Serial <69764315+Serial-ATA@users.noreply.github.com> Date: Thu, 5 Jan 2023 14:41:23 -0500 Subject: [PATCH] ItemKey: Add `ItemKey::Color` --- CHANGELOG.md | 4 +++- src/tag/item.rs | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96891c73e..b6b788b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **MP4**: - The `InitialKey`, `ReplayGain*`, and "precise BPM" identifiers now have `ItemKey` mappings ([PR](https://github.com/Serial-ATA/lofty-rs/pull/93)) - `AtomIdent` now implements `TryFrom` ([PR](https://github.com/Serial-ATA/lofty-rs/pull/96)) - - Added support for the vendor-supplied XID in files from the Apple iTunes store as `AppleXID`. + - Added support for the vendor-supplied XID in files from the Apple iTunes store as `ItemKey::AppleXID`. - **Vorbis Comments**: - Additional mappings for the `Label`, `Remixer`, and `EncodedBy` `ItemKey` variants ([PR](https://github.com/Serial-ATA/lofty-rs/pull/94)) - **ID3v2**: A new `id3v2_compression_support` feature to optionally depend on `flate2` for decompressing frames +- **ItemKey**: + - New Variants: `AppleXID`, `Director`, `Color` ### Changed - **MP4**: `AtomIdent` stores freeform identifiers as `Cow` opposed to `String` ([PR](https://github.com/Serial-ATA/lofty-rs/pull/95)) diff --git a/src/tag/item.rs b/src/tag/item.rs index 11186ca35..6227046d0 100644 --- a/src/tag/item.rs +++ b/src/tag/item.rs @@ -113,6 +113,7 @@ gen_map!( "REPLAYGAIN_TRACK_GAIN" => ReplayGainTrackGain, "REPLAYGAIN_TRACK_PEAK" => ReplayGainTrackPeak, "Genre" => Genre, + "Color" => Color, "Mood" => Mood, "Copyright" => CopyrightMessage, "Comment" => Comment, @@ -188,6 +189,7 @@ gen_map!( "WPUB" => PublisherURL, "TCON" => Genre, "TKEY" => InitialKey, + "COLOR" => Color, "TMOO" => Mood, "TBPM" => BPM, "TCOP" => CopyrightMessage, @@ -245,6 +247,7 @@ gen_map!( "\u{a9}enc" => EncodedBy, "\u{a9}too" => EncoderSoftware, "\u{a9}gen" => Genre, + "----:com.apple.iTunes:COLOR" => Color, "----:com.apple.iTunes:MOOD" => Mood, "----:com.apple.iTunes:BPM" | "tmpo" => BPM, // precise bpm (freeform atom) vs. integer bpm (fourcc atom) as fallback "----:com.apple.iTunes:initialkey" => InitialKey, @@ -338,6 +341,7 @@ gen_map!( "REPLAYGAIN_TRACK_GAIN" => ReplayGainTrackGain, "REPLAYGAIN_TRACK_PEAK" => ReplayGainTrackPeak, "GENRE" => Genre, + "COLOR" => Color, "MOOD" => Mood, "BPM" => BPM, "COPYRIGHT" => CopyrightMessage, @@ -529,6 +533,7 @@ gen_item_keys!( // Style Genre, InitialKey, + Color, Mood, BPM,