Skip to content

Commit

Permalink
Fix MusicBrainz nomenclature: album → release
Browse files Browse the repository at this point in the history
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 <freso.dk@gmail.com>
  • Loading branch information
Freso committed Feb 13, 2019
1 parent 9524289 commit 75c5646
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ HARD

- write xbmc/plex plugin

SPECIFIC ALBUMS ISSUES
SPECIFIC RELEASES ISSUES

- on ana, Goldfrapp tells me I have offset 0!

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions whipper/command/cd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions whipper/common/mbngs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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",
Expand Down
18 changes: 9 additions & 9 deletions whipper/common/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion whipper/result/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 75c5646

Please sign in to comment.