replaygain: restrict file formats (GC-469)

This commit is contained in:
Adrian Sampson 2012-12-11 13:06:57 -08:00
parent 98892945c2
commit 531025f799

View file

@ -162,6 +162,10 @@ class ReplayGainPlugin(BeetsPlugin):
def requires_gain(self, item, album=False):
"""Does the gain need to be computed?"""
if 'mp3gain' in self.command and item.format != 'MP3':
return False
elif 'aacgain' in self.command and item.format not in ('MP3', 'AAC'):
return False
return self.overwrite or \
(not item.rg_track_gain or not item.rg_track_peak) or \
((not item.rg_album_gain or not item.rg_album_peak) and \