From 17842b8d0d4468ceaba5e839e47a96392ac2bf09 Mon Sep 17 00:00:00 2001 From: Fabrice Laporte Date: Sat, 21 Jul 2012 19:02:27 +0200 Subject: [PATCH] rgain: fix computation on singleton import --- beetsplug/replaygain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index b99567fe4..f5880c925 100755 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -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)