Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add other tag aliases from musicbrainz #103

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 46 additions & 42 deletions docs/TAGGING_CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Rosé manages the following tags:
- Title
- Release Artists
- Release Year
- Composition Year (for Classical)
- Release Type (e.g. Album, EP, Single)
- Genre
- Label
Expand Down Expand Up @@ -105,51 +106,54 @@ world, Rosé will support reading from additional fields.

## MP3

| Tag | Field Name | Will Ingest These Fields |
| --------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Release Title | `TALB` | |
| Release Artists | `TPE2` | |
| Release Year | `TDRC` | `TYER` |
| Release Type | `TXXX:RELEASETYPE` | |
| Genre | `TCON` | |
| Label | `TPUB` | |
| Track Title | `TIT2` | |
| Track Artists | `TPE1` | `TPE4` (Remixer), `TCOM` (Composer), `TPE3` (Conductor), `TIPL,IPLS/producer` (producer), `TIPL,IPLS/DJ-mix` (djmixer) |
| Track Number | `TRCK` | |
| Disc Number | `TPOS` | |
| Rosé ID | `TXXX:ROSEID` | |
| Rosé Release ID | `TXXX:ROSERELEASEID` | |
| Tag | Field Name | Will Ingest These Fields |
| ---------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Release Title | `TALB` | |
| Release Artists | `TPE2` | |
| Release Year | `TDRC` | `TYER`, `TDAT` |
| Release Type | `TXXX:RELEASETYPE` | `TXXX:MusicBrainz Album Type` |
| Genre | `TCON` | |
| Label | `TPUB` | |
| Track Title | `TIT2` | |
| Track Artists | `TPE1` | `TPE4` (Remixer), `TCOM` (Composer), `TPE3` (Conductor), `TIPL,IPLS/producer` (producer), `TIPL,IPLS/DJ-mix` (djmixer) |
| Track Number | `TRCK` | |
| Disc Number | `TPOS` | |
| Composition Year | `TXXX:COMPOSITIONYEAR ` | |
| Rosé ID | `TXXX:ROSEID` | |
| Rosé Release ID | `TXXX:ROSERELEASEID` | |

## MP4

| Tag | Field Name | Will Ingest These Fields |
| --------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Release Title | `\xa9alb` | |
| Release Artists | `aART` | |
| Release Year | `\xa9day` | |
| Release Type | `----:com.apple.iTunes:RELEASETYPE` | |
| Genre | `\xa9gen` | |
| Label | `----:com.apple.iTunes:LABEL` | |
| Track Title | `\xa9nam` | |
| Track Artists | `\xa9ART` | `----:com.apple.iTunes:REMIXER` (Remixer), `\xa9wrt` (Composer), `----:com.apple.iTunes:CONDUCTOR` (Conductor), `----:com.apple.iTunes:PRODUCER` (producer), `----:com.apple.iTunes:DJMIXER` (djmixer) |
| Track Number | `trkn` | |
| Disc Number | `disk` | |
| Rosé ID | `----:net.sunsetglow.rose:ID` | |
| Rosé Release ID | `----:net.sunsetglow.rose:RELEASEID` | |
| Tag | Field Name | Will Ingest These Fields |
| ---------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Release Title | `\xa9alb` | |
| Release Artists | `aART` | |
| Release Year | `\xa9day` | |
| Release Type | `----:com.apple.iTunes:RELEASETYPE` | `----:com.apple.iTunes:MusicBrainz Album Type` |
| Genre | `\xa9gen` | |
| Label | `----:com.apple.iTunes:LABEL` | |
| Track Title | `\xa9nam` | |
| Track Artists | `\xa9ART` | `----:com.apple.iTunes:REMIXER` (Remixer), `\xa9wrt` (Composer), `----:com.apple.iTunes:CONDUCTOR` (Conductor), `----:com.apple.iTunes:PRODUCER` (producer), `----:com.apple.iTunes:DJMIXER` (djmixer) |
| Track Number | `trkn` | |
| Disc Number | `disk` | |
| Composition Year | `----:net.sunsetglow.rose:COMPOSITIONYEAR` | |
| Rosé ID | `----:net.sunsetglow.rose:ID` | |
| Rosé Release ID | `----:net.sunsetglow.rose:RELEASEID` | |

## Vorbis

| Tag | Field Name | Will Ingest These Fields |
| --------------- | --------------- | --------------------------------------------------------------------------------------------------------------- |
| Release Title | `release` | |
| Release Artists | `albumartist` | |
| Release Year | `date` | `year` |
| Release Type | `releasetype` | |
| Genre | `genre` | |
| Label | `organization` | `label`, `recordlabel` |
| Track Title | `title` | |
| Track Artists | `artist` | `remixer` (Remixer), `composer` (Composer), `conductor` (Conductor), `producer` (producer), `djmixer` (djmixer) |
| Track Number | `tracknumber` | |
| Disc Number | `discnumber` | |
| Rosé ID | `roseid` | |
| Rosé Release ID | `rosereleaseid` | |
| Tag | Field Name | Will Ingest These Fields |
| ---------------- | ----------------- | --------------------------------------------------------------------------------------------------------------- |
| Release Title | `release` | |
| Release Artists | `albumartist` | |
| Release Year | `date` | `year` |
| Release Type | `releasetype` | |
| Genre | `genre` | |
| Label | `label` | `organization`, `recordlabel` |
| Track Title | `title` | |
| Track Artists | `artist` | `remixer` (Remixer), `composer` (Composer), `conductor` (Conductor), `producer` (producer), `djmixer` (djmixer) |
| Track Number | `tracknumber` | |
| Disc Number | `discnumber` | |
| Composition Year | `compositionyear` | |
| Rosé ID | `roseid` | |
| Rosé Release ID | `rosereleaseid` | |
17 changes: 14 additions & 3 deletions rose/audiotags.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _get_paired_frame(x: str) -> str | None:
id=_get_tag(m.tags, ["TXXX:ROSEID"], first=True),
release_id=_get_tag(m.tags, ["TXXX:ROSERELEASEID"], first=True),
title=_get_tag(m.tags, ["TIT2"]),
releaseyear=_parse_year(_get_tag(m.tags, ["TDRC", "TYER"])),
releaseyear=_parse_year(_get_tag(m.tags, ["TDRC", "TYER", "TDAT"])),
compositionyear=_parse_year(_get_tag(m.tags, ["TXXX:COMPOSITIONDATE"], first=True)),
tracknumber=tracknumber,
tracktotal=tracktotal,
Expand All @@ -155,7 +155,11 @@ def _get_paired_frame(x: str) -> str | None:
genre=_split_tag(_get_tag(m.tags, ["TCON"], split=True)),
label=_split_tag(_get_tag(m.tags, ["TPUB"], split=True)),
catalognumber=_get_tag(m.tags, ["TXXX:CATALOGNUMBER"], first=True),
releasetype=_normalize_rtype(_get_tag(m.tags, ["TXXX:RELEASETYPE"], first=True)),
releasetype=_normalize_rtype(
_get_tag(
m.tags, ["TXXX:RELEASETYPE", "TXXX:MusicBrainz Album Type"], first=True
)
),
releaseartists=parse_artist_string(main=_get_tag(m.tags, ["TPE2"], split=True)),
trackartists=parse_artist_string(
main=_get_tag(m.tags, ["TPE1"], split=True),
Expand Down Expand Up @@ -194,7 +198,14 @@ def _get_paired_frame(x: str) -> str | None:
label=_split_tag(_get_tag(m.tags, ["----:com.apple.iTunes:LABEL"], split=True)),
catalognumber=_get_tag(m.tags, ["----:com.apple.iTunes:CATALOGNUMBER"]),
releasetype=_normalize_rtype(
_get_tag(m.tags, ["----:com.apple.iTunes:RELEASETYPE"], first=True)
_get_tag(
m.tags,
[
"----:com.apple.iTunes:RELEASETYPE",
"----:com.apple.iTunes:MusicBrainz Album Type",
],
first=True,
)
),
releaseartists=parse_artist_string(main=_get_tag(m.tags, ["aART"], split=True)),
trackartists=parse_artist_string(
Expand Down
Loading