mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
ID3v2: Handle TXXX ItemKey
conversions correctly
This commit is contained in:
parent
da4dea1f8b
commit
c629e0e4bd
2 changed files with 7 additions and 3 deletions
|
@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
- **MusePack**: Fix potential panic when the beginning silence makes up the entire sample count ([PR](https://github.com/Serial-ATA/lofty-rs/pull/449))
|
||||
- **Timestamp**: Support timestamps without separators (ex. "20240906" vs "2024-09-06") ([issue](https://github.com/Serial-ATA/lofty-rs/issues/452)) ([PR](https://github.com/Serial-ATA/lofty-rs/issues/453))
|
||||
- **ID3v2**: `ItemKey::Director` will now be written correctly as a TXXX frame ([PR](https://github.com/Serial-ATA/lofty-rs/issues/454))
|
||||
|
||||
## [0.21.1] - 2024-08-28
|
||||
|
||||
|
|
|
@ -1379,7 +1379,6 @@ impl MergeTag for SplitTagRemainder {
|
|||
&ItemKey::Composer,
|
||||
&ItemKey::Conductor,
|
||||
&ItemKey::Writer,
|
||||
&ItemKey::Director,
|
||||
&ItemKey::Lyricist,
|
||||
&ItemKey::MusicianCredits,
|
||||
&ItemKey::InternetRadioStationName,
|
||||
|
@ -1403,8 +1402,11 @@ impl MergeTag for SplitTagRemainder {
|
|||
}
|
||||
|
||||
// Multi-valued TXXX key-to-frame mappings
|
||||
#[allow(clippy::single_element_loop)]
|
||||
for item_key in [&ItemKey::TrackArtists] {
|
||||
for item_key in [
|
||||
&ItemKey::TrackArtists,
|
||||
&ItemKey::Director,
|
||||
&ItemKey::CatalogNumber,
|
||||
] {
|
||||
let frame_id = item_key
|
||||
.map_key(TagType::Id3v2, false)
|
||||
.expect("valid frame id");
|
||||
|
@ -1521,6 +1523,7 @@ impl MergeTag for SplitTagRemainder {
|
|||
));
|
||||
}
|
||||
|
||||
// iTunes advisory rating
|
||||
'rate: {
|
||||
if let Some(advisory_rating) = tag.take_strings(&ItemKey::ParentalAdvisory).next() {
|
||||
let Ok(rating) = advisory_rating.parse::<u8>() else {
|
||||
|
|
Loading…
Reference in a new issue