discogs: tweak pruning of empty candidate albums

This commit is contained in:
Diego M. Rodriguez 2016-12-30 11:39:19 +01:00
parent 37cb1c295f
commit 3f36f67940
No known key found for this signature in database
GPG key ID: 7DFAF18D8415B8F9

View file

@ -205,8 +205,8 @@ class DiscogsPlugin(BeetsPlugin):
self._log.debug(u"Communication error while searching for {0!r}",
query, exc_info=True)
return []
return filter(None, [self.get_album_info(release)
for release in releases[:5]])
return [album for album in map(self.get_album_info, releases[:5])
if album]
def get_album_info(self, result):
"""Returns an AlbumInfo object for a discogs Release object.