Skip to content

Commit

Permalink
Merge pull request #5 from savonet/picard-some
Browse files Browse the repository at this point in the history
Harmonize with the picard mappings.
  • Loading branch information
toots authored Jan 29, 2024
2 parents 3c26ede + c35c27d commit 8d974cc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

- Add basic example.
- Add optional custom parser argument to override the default parsing mechanism.
- Update default metadata mappings to follow musicbrainz's picard mapping.
- Add `MIME` module to guess MIME type of files (#4).

0.2.0 (2023-07-01)
Expand Down
27 changes: 21 additions & 6 deletions src/metadataID3v2.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,38 @@ let normalize_id = function
| "TALB" -> "album"
| "TBPM" -> "bpm"
| "TCOM" -> "composer"
| "TCON" -> "content"
| "TCON" -> "genre"
| "TCOP" -> "copyright"
| "TDAT" -> "date"
| "TDOR" -> "original release time"
| "TDRC" -> "recording time"
| "TENC" -> "encoder"
| "TENC" -> "encodedby"
| "TEXT" -> "lyricist"
| "TIT1" -> "grouping"
| "TIT2" -> "title"
| "TIT3" -> "subtitle"
| "TKEY" -> "key"
| "TLAN" -> "language"
| "TLEN" -> "length"
| "TMED" -> "media type"
| "TOPE" -> "performer"
| "TMED" -> "media"
| "TOAL" -> "originalalbum"
| "TOFN" -> "originalfilename"
| "TOPE" -> "originalartist"
| "TPOS" -> "discnumber"
| "TPE1" -> "artist"
| "TPE2" -> "band"
| "TPUB" -> "publisher"
| "TPE2" -> "albumartist"
| "TPE3" -> "conductor"
| "TPE4" -> "remixer"
| "TPUB" -> "label"
| "TRCK" -> "tracknumber"
| "TSOA" -> "albumsort"
| "TSO2" -> "albumartistsort"
| "TSOT" -> "titlesort"
| "TSRC" -> "isrc"
| "TSSE" -> "encoder"
| "TSST" -> "discsubtitle"
| "TYER" -> "year"
| "WOAR" -> "website"
| "WXXX" -> "url"
| id -> id

Expand Down
3 changes: 3 additions & 0 deletions src/metadataMP4.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ let tagn =
[
("\xa9nam", "title");
("\xa9ART", "artist");
("cprt", "copyright");
("\xa9too", "encoder");
("\xa9day", "date");
("\xa9cpy", "copyright");
("\xa9gen", "genre");
("\xa9wrt", "composer");
("\xa9alb", "album");
("\xa9des", "description");
("\xa9cmt", "comment");
Expand Down

0 comments on commit 8d974cc

Please sign in to comment.