From 0f4b907ff5b22399c5000e3eb5eeb3f8855eee10 Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Tue, 14 Jun 2016 00:28:46 -0400 Subject: [PATCH] wrap filter()s in a list() in replaygain plugin --- beetsplug/replaygain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index 2e215938d..c58a1db9b 100644 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -286,7 +286,7 @@ class CommandBackend(Backend): """Computes the track gain of the given tracks, returns a list of TrackGain objects. """ - supported_items = filter(self.format_supported, items) + supported_items = list(filter(self.format_supported, items)) output = self.compute_gain(supported_items, False) return output @@ -297,7 +297,7 @@ class CommandBackend(Backend): # TODO: What should be done when not all tracks in the album are # supported? - supported_items = filter(self.format_supported, album.items()) + supported_items = list(filter(self.format_supported, album.items())) if len(supported_items) != len(album.items()): self._log.debug(u'tracks are of unsupported format') return AlbumGain(None, [])