Fix popularimeter/parental advisory mixup

This commit is contained in:
Serial 2022-02-18 23:33:20 -05:00
parent 4c0b7c2273
commit a5c66c5d36
No known key found for this signature in database
GPG key ID: DA95198DC17C4568
2 changed files with 5 additions and 3 deletions

View file

@ -108,6 +108,7 @@ pub(super) fn parse_content(
id: &str, id: &str,
version: Id3v2Version, version: Id3v2Version,
) -> Result<FrameValue> { ) -> Result<FrameValue> {
// TODO: POPM frame
Ok(match id { Ok(match id {
// The ID was previously upgraded, but the content remains unchanged, so version is necessary // The ID was previously upgraded, but the content remains unchanged, so version is necessary
"APIC" => { "APIC" => {

View file

@ -230,7 +230,7 @@ gen_map! (
"disk" => DiscTotal, "disk" => DiscTotal,
"trkn" => TrackNumber, "trkn" => TrackNumber,
"trkn" => TrackTotal, "trkn" => TrackTotal,
"rate" => LawRating, "rtng" => ParentalAdvisory,
"\u{a9}day" => RecordingDate, "\u{a9}day" => RecordingDate,
"----:com.apple.iTunes:ISRC" => ISRC, "----:com.apple.iTunes:ISRC" => ISRC,
"----:com.apple.iTunes:BARCODE" => Barcode, "----:com.apple.iTunes:BARCODE" => Barcode,
@ -269,7 +269,7 @@ gen_map! (
"IPRO" => Producer, "IPRO" => Producer,
"IPRT" | "ITRK" => TrackNumber, "IPRT" | "ITRK" => TrackNumber,
"IFRM" => TrackTotal, "IFRM" => TrackTotal,
"IRTD" => LawRating, "IRTD" => Popularimeter,
"ICRD" => RecordingDate, "ICRD" => RecordingDate,
"TLEN" => Length, "TLEN" => Length,
"ISRF" => OriginalMediaType, "ISRF" => OriginalMediaType,
@ -313,6 +313,7 @@ gen_map!(
"DISCTOTAL" | "TOTALDISCS" => DiscTotal, "DISCTOTAL" | "TOTALDISCS" => DiscTotal,
"TRACKNUMBER" => TrackNumber, "TRACKNUMBER" => TrackNumber,
"TRACKTOTAL" | "TOTALTRACKS" => TrackTotal, "TRACKTOTAL" | "TOTALTRACKS" => TrackTotal,
"RATING" => Popularimeter,
"DATE" => RecordingDate, "DATE" => RecordingDate,
"YEAR" => Year, "YEAR" => Year,
"ORIGINALDATE" => OriginalReleaseDate, "ORIGINALDATE" => OriginalReleaseDate,
@ -471,7 +472,7 @@ gen_item_keys!(
TrackNumber, TrackNumber,
TrackTotal, TrackTotal,
Popularimeter, Popularimeter,
LawRating, ParentalAdvisory,
// Dates // Dates
RecordingDate, RecordingDate,