From 75c5646d1ef100c2f24ec3e08b11606f7ffb6a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20=E2=80=9CFreso=E2=80=9D=20S=2E=20Olesen?= Date: Wed, 13 Feb 2019 14:46:16 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20MusicBrainz=20nomenclature:=20album=20?= =?UTF-8?q?=E2=86=92=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In general, "albums" in everyday usage is what on MusicBrainz would be considered a release group[1] while as far as I can tell, every single instance of it being used in whipper is referring to a single "edition" of an album, which is what would be called a "release" in MusicBrainz terminology[2]. [1] https://musicbrainz.org/doc/Release_Group [2] https://musicbrainz.org/doc/Release Signed-off-by: Frederik “Freso” S. Olesen --- TODO | 4 ++-- whipper/command/cd.py | 4 ++-- whipper/common/mbngs.py | 6 +++--- whipper/common/program.py | 18 +++++++++--------- whipper/result/logger.py | 3 ++- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/TODO b/TODO index 3e2b835d..d472f59e 100644 --- a/TODO +++ b/TODO @@ -56,7 +56,7 @@ HARD - write xbmc/plex plugin -SPECIFIC ALBUMS ISSUES +SPECIFIC RELEASES ISSUES - on ana, Goldfrapp tells me I have offset 0! @@ -67,7 +67,7 @@ SPECIFIC ALBUMS ISSUES NO DECISION YET -- possibly figure out how to name albums with credited artist; look at gorky and spiritualized electric mainline +- possibly figure out how to name releases with credited artist; look at gorky and spiritualized electric mainline - check if cdda2wav or icedax analyze pregaps correctly diff --git a/whipper/command/cd.py b/whipper/command/cd.py index f3ce6613..917e9b15 100644 --- a/whipper/command/cd.py +++ b/whipper/command/cd.py @@ -51,8 +51,8 @@ Disc files (.cue, .log, .m3u) are named according to the disc template, filling in the variables and adding the file extension. Variables for both disc and track template are: - - %A: album artist - - %S: album sort name + - %A: release artist + - %S: release sort name - %d: disc title - %y: release year - %r: release type, lowercase diff --git a/whipper/common/mbngs.py b/whipper/common/mbngs.py index c16d529e..3400e93a 100644 --- a/whipper/common/mbngs.py +++ b/whipper/common/mbngs.py @@ -57,7 +57,7 @@ class TrackMetadata(object): class DiscMetadata(object): """ @param artist: artist(s) name - @param sortName: album artist sort name + @param sortName: release artist sort name @param release: earliest release date, in YYYY-MM-DD @type release: unicode @param title: title of the disc (with disambiguation) @@ -176,10 +176,10 @@ def _getMetadata(releaseShort, release, discid, country=None): if len(discCredit) > 1: logger.debug('artist-credit more than 1: %r', discCredit) - albumArtistName = discCredit.getName() + releaseArtistName = discCredit.getName() # getUniqueName gets disambiguating names like Muse (UK rock band) - discMD.artist = albumArtistName + discMD.artist = releaseArtistName discMD.sortName = discCredit.getSortName() if 'date' not in release: logger.warning("release with ID '%s' (%s - %s) does not have a date", diff --git a/whipper/common/program.py b/whipper/common/program.py index 6906ef13..d07df5cc 100644 --- a/whipper/common/program.py +++ b/whipper/common/program.py @@ -169,8 +169,8 @@ def getPath(self, outdir, template, mbdiscid, metadata, track_number=None): Disc files (.cue, .log, .m3u) are named according to the disc template, filling in the variables and adding the file extension. Variables for both disc and track template are: - - %A: album artist - - %S: album artist sort name + - %A: release artist + - %S: release artist sort name - %d: disc title - %y: release year - %r: release type, lowercase @@ -377,16 +377,16 @@ def getTagList(self, number, mbdiscid): @rtype: dict """ trackArtist = u'Unknown Artist' - albumArtist = u'Unknown Artist' + releaseArtist = u'Unknown Artist' disc = u'Unknown Disc' title = u'Unknown Track' if self.metadata: trackArtist = self.metadata.artist - albumArtist = self.metadata.artist + releaseArtist = self.metadata.artist disc = self.metadata.title - mbidAlbum = self.metadata.mbid - mbidTrackAlbum = self.metadata.mbidArtist + mbidRelease = self.metadata.mbid + mbidReleaseArtist = self.metadata.mbidArtist if number > 0: try: @@ -408,7 +408,7 @@ def getTagList(self, number, mbdiscid): tags['MUSICBRAINZ_DISCID'] = mbdiscid if self.metadata and not self.metadata.various: - tags['ALBUMARTIST'] = albumArtist + tags['ALBUMARTIST'] = releaseArtist tags['ARTIST'] = trackArtist tags['TITLE'] = title tags['ALBUM'] = disc @@ -422,8 +422,8 @@ def getTagList(self, number, mbdiscid): if number > 0: tags['MUSICBRAINZ_TRACKID'] = mbidTrack tags['MUSICBRAINZ_ARTISTID'] = mbidTrackArtist - tags['MUSICBRAINZ_ALBUMID'] = mbidAlbum - tags['MUSICBRAINZ_ALBUMARTISTID'] = mbidTrackAlbum + tags['MUSICBRAINZ_ALBUMID'] = mbidRelease + tags['MUSICBRAINZ_ALBUMARTISTID'] = mbidReleaseArtist # TODO/FIXME: ISRC tag diff --git a/whipper/result/logger.py b/whipper/result/logger.py index 6da9f524..5858b59a 100644 --- a/whipper/result/logger.py +++ b/whipper/result/logger.py @@ -65,7 +65,8 @@ def logRip(self, ripResult, epoch): # CD metadata lines.append("CD metadata:") - lines.append(" Album: %s - %s" % (ripResult.artist, ripResult.title)) + lines.append(" Release: %s - %s" % + (ripResult.artist, ripResult.title)) lines.append(" CDDB Disc ID: %s" % ripResult. table.getCDDBDiscId()) lines.append(" MusicBrainz Disc ID: %s" % ripResult. table.getMusicBrainzDiscId())