diff --git a/src/ape/tag/mod.rs b/src/ape/tag/mod.rs index e2804c1c..e03f6a96 100644 --- a/src/ape/tag/mod.rs +++ b/src/ape/tag/mod.rs @@ -316,6 +316,17 @@ impl From for Tag { { continue }, + (ItemKey::MovementNumber | ItemKey::MovementTotal, ItemValue::Text(val)) + if split_pair( + val, + &mut tag, + ItemKey::MovementNumber, + ItemKey::MovementTotal, + ) + .is_some() => + { + continue + }, (k, _) => tag.items.push(TagItem::new(k, item.value)), } } diff --git a/src/id3/v2/tag.rs b/src/id3/v2/tag.rs index f6480edf..2188d9de 100644 --- a/src/id3/v2/tag.rs +++ b/src/id3/v2/tag.rs @@ -543,6 +543,17 @@ impl From for Tag { { continue }, + ("MVIN", FrameValue::Text { value: content, .. }) + if split_pair( + &content, + &mut tag, + ItemKey::MovementNumber, + ItemKey::MovementTotal, + ) + .is_some() => + { + continue + }, // Store TXXX/WXXX frames by their descriptions, rather than their IDs ( "TXXX", diff --git a/src/tag/item.rs b/src/tag/item.rs index 6833ee75..ab7f538b 100644 --- a/src/tag/item.rs +++ b/src/tag/item.rs @@ -78,6 +78,10 @@ gen_map!( "Grouping" => ContentGroup, "Title" => TrackTitle, "Subtitle" => TrackSubtitle, + "WORKTITLE" => Work, + "MOVEMENTNAME" => Movement, + "MOVEMENT" => MovementNumber, + "MOVEMENTTOTAL" => MovementTotal, "ALBUMSORT" => AlbumTitleSortOrder, "ALBUMARTISTSORT" => AlbumArtistSortOrder, "TITLESORT" => TrackTitleSortOrder, @@ -162,8 +166,10 @@ gen_map!( "TDRC" => RecordingDate, "TDOR" => OriginalReleaseDate, "TSRC" => ISRC, + "WORK" => Work, // ID3v2.4: TXXX:WORK (Apple uses TIT1/ContentGroup, see GRP1/AppleId3v2ContentGroup for disambiguation) "MVNM" => Movement, - "MVIN" => MovementIndex, + "MVIN" => MovementNumber, + "MVIN" => MovementTotal, "TCMP" => FlagCompilation, "PCST" => FlagPodcast, "TFLT" => FileType, @@ -214,6 +220,10 @@ gen_map!( "\u{a9}grp" => ContentGroup, "\u{a9}nam" => TrackTitle, "----:com.apple.iTunes:SUBTITLE" => TrackSubtitle, + "\u{a9}wrk" => Work, + "\u{a9}mvn" => Movement, + "\u{a9}mvi" => MovementNumber, + "\u{a9}mvc" => MovementTotal, "soal" => AlbumTitleSortOrder, "soaa" => AlbumArtistSortOrder, "sonm" => TrackTitleSortOrder, @@ -302,6 +312,10 @@ gen_map!( "GROUPING" => ContentGroup, "TITLE" => TrackTitle, "SUBTITLE" => TrackSubtitle, + "WORK" => Work, + "MOVEMENTNAME" => Movement, + "MOVEMENT" => MovementNumber, + "MOVEMENTTOTAL" => MovementTotal, "ALBUMSORT" => AlbumTitleSortOrder, "ALBUMARTISTSORT" => AlbumArtistSortOrder, "TITLESORT" => TrackTitleSortOrder, @@ -496,8 +510,10 @@ gen_item_keys!( ISRC, Barcode, CatalogNumber, + Work, Movement, - MovementIndex, + MovementNumber, + MovementTotal, // Flags FlagCompilation,