wrap filter()s in a list() in replaygain plugin

This commit is contained in:
Johnny Robeson 2016-06-14 00:28:46 -04:00
parent 622945e2a9
commit 0f4b907ff5

View file

@ -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, [])