rgain: fix computation on singleton import

This commit is contained in:
Fabrice Laporte 2012-07-21 19:02:27 +02:00
parent 6208c453c6
commit 17842b8d0d

View file

@ -90,7 +90,7 @@ class ReplayGainPlugin(BeetsPlugin):
def item_imported(self, lib, item, config):
try:
mf = MediaFile(syspath(item.path))
self.write_rgain(mf, self.compute_rgain(mf))
self.write_rgain([mf], self.compute_rgain([mf]))
except (FileTypeError, UnreadableFileError,
TypeError, ValueError) as e:
log.error("failed to calculate replaygain: %s ", e)