From a5c66c5d36924d42ab8123c370331e5926c9445b Mon Sep 17 00:00:00 2001 From: Serial <69764315+Serial-ATA@users.noreply.github.com> Date: Fri, 18 Feb 2022 23:33:20 -0500 Subject: [PATCH] Fix popularimeter/parental advisory mixup --- src/id3/v2/frame/content.rs | 1 + src/types/item.rs | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/id3/v2/frame/content.rs b/src/id3/v2/frame/content.rs index 4a46d798..e2598181 100644 --- a/src/id3/v2/frame/content.rs +++ b/src/id3/v2/frame/content.rs @@ -108,6 +108,7 @@ pub(super) fn parse_content( id: &str, version: Id3v2Version, ) -> Result { + // TODO: POPM frame Ok(match id { // The ID was previously upgraded, but the content remains unchanged, so version is necessary "APIC" => { diff --git a/src/types/item.rs b/src/types/item.rs index 1f212304..73ea81cc 100644 --- a/src/types/item.rs +++ b/src/types/item.rs @@ -230,7 +230,7 @@ gen_map! ( "disk" => DiscTotal, "trkn" => TrackNumber, "trkn" => TrackTotal, - "rate" => LawRating, + "rtng" => ParentalAdvisory, "\u{a9}day" => RecordingDate, "----:com.apple.iTunes:ISRC" => ISRC, "----:com.apple.iTunes:BARCODE" => Barcode, @@ -269,7 +269,7 @@ gen_map! ( "IPRO" => Producer, "IPRT" | "ITRK" => TrackNumber, "IFRM" => TrackTotal, - "IRTD" => LawRating, + "IRTD" => Popularimeter, "ICRD" => RecordingDate, "TLEN" => Length, "ISRF" => OriginalMediaType, @@ -313,6 +313,7 @@ gen_map!( "DISCTOTAL" | "TOTALDISCS" => DiscTotal, "TRACKNUMBER" => TrackNumber, "TRACKTOTAL" | "TOTALTRACKS" => TrackTotal, + "RATING" => Popularimeter, "DATE" => RecordingDate, "YEAR" => Year, "ORIGINALDATE" => OriginalReleaseDate, @@ -471,7 +472,7 @@ gen_item_keys!( TrackNumber, TrackTotal, Popularimeter, - LawRating, + ParentalAdvisory, // Dates RecordingDate,