Skip to content

Commit cded302

Browse files
committed
EBML: Define more tag mappings
1 parent bba24de commit cded302

File tree

1 file changed

+71
-6
lines changed

1 file changed

+71
-6
lines changed

lofty/src/ebml/tag/generic.rs

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ macro_rules! matroska_mapping_tables {
2626
pub(crate) const SUPPORTED_ITEMKEYS: &[ItemKey] = &[
2727
$(
2828
$(
29-
ItemKey::$item_key
30-
),*
29+
ItemKey::$item_key,
30+
)*
3131
)+
3232
];
3333

@@ -53,16 +53,81 @@ macro_rules! matroska_mapping_tables {
5353
};
5454
}
5555

56-
// TODO: Actually define all the mappings
5756
matroska_mapping_tables!(
5857
Shot => [];
5958
Scene => [];
6059
Track => [
61-
"TITLE" <=> TrackTitle,
62-
"ARTIST" <=> TrackArtist,
60+
// Organization Information
61+
"PART_NUMBER" <=> TrackNumber,
62+
63+
// Titles
64+
"TITLE" <=> TrackTitle,
65+
66+
// Nested Information
67+
"SORT_WITH" <=> TrackTitleSortOrder,
68+
69+
// Entities
70+
"ARTIST" <=> TrackArtist,
71+
"LYRICS" <=> Lyrics,
72+
"COMPOSER" <=> Composer,
73+
"ARRANGER" <=> Arranger,
74+
"LYRICIST" <=> Lyricist,
75+
"CONDUCTOR" <=> Conductor,
76+
"DIRECTOR" <=> Director,
77+
"PRODUCER" <=> Producer,
78+
"ENCODED_BY" <=> EncodedBy,
79+
"MIXED_BY" <=> MixDj,
80+
"REMIXED_BY" <=> Remixer,
81+
"PUBLISHER" <=> Publisher,
82+
"LABEL" <=> Label,
83+
84+
// Search and Classification
85+
"GENRE" <=> Genre,
86+
"MOOD" <=> Mood,
87+
"INITIAL_KEY" <=> InitialKey,
88+
"ORIGINAL_MEDIA_TYPE" <=> OriginalMediaType,
89+
90+
// Technical Information
91+
"ENCODER" <=> EncoderSoftware,
92+
"ENCODER_SETTINGS" <=> EncoderSettings,
93+
"BPM" <=> Bpm,
94+
// TODO: ReplayGain? The values are binary in Matroska
95+
96+
// Identifiers
97+
"ISRC" <=> Isrc,
98+
"BARCODE" <=> Barcode,
99+
"CATALOG_NUMBER" <=> CatalogNumber,
63100
];
64101
Part => [];
65-
Album => [];
102+
Album => [
103+
// Organization Information
104+
"TOTAL_PARTS" <=> TrackTotal,
105+
106+
// Titles
107+
"TITLE" <=> AlbumTitle,
108+
109+
// Nested Information
110+
"SORT_WITH" <=> AlbumTitleSortOrder,
111+
112+
// Entities
113+
"ARTIST" <=> AlbumArtist,
114+
115+
// Temporal Information
116+
"DATE_RELEASED" <=> ReleaseDate,
117+
"DATE_RECORDED" <=> RecordingDate,
118+
119+
// Technical Information
120+
// TODO: ReplayGain? The values are binary in Matroska
121+
122+
// Commercial
123+
"PURCHASE_ITEM" <=> PaymentUrl,
124+
"PURCHASE_INFO" <=> CommercialInformationUrl,
125+
"PURCHASE_OWNER" <=> FileOwner,
126+
127+
// Legal
128+
"COPYRIGHT" <=> CopyrightMessage,
129+
"LICENSE" <=> License,
130+
];
66131
Edition => [];
67132
Collection => [];
68133
);

0 commit comments

Comments
 (0)