mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 15:03:22 +01:00
replaygain: restrict file formats (GC-469)
This commit is contained in:
parent
98892945c2
commit
531025f799
1 changed files with 4 additions and 0 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Reference in a new issue