From 763cfa06b47eea3d7eb97f4addca5cc6625c2376 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Fri, 10 May 2013 16:43:17 +0100 Subject: [PATCH] Don't check for item.paths == None as that can't happen --- beetsplug/missing.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/beetsplug/missing.py b/beetsplug/missing.py index 4d7bfbc2d..54fa2a846 100644 --- a/beetsplug/missing.py +++ b/beetsplug/missing.py @@ -34,11 +34,9 @@ def _missing_count(album): def _missing(album): '''Query MusicBrainz to determine items missing from `album`. ''' - item_paths = filter(None, map(lambda i: i.path, album.items())) - item_mbids = map(lambda x: x.mb_trackid, - filter(lambda i: i.path is not None, album.items())) + item_mbids = map(lambda x: x.mb_trackid, album.items()) - if len(item_paths) < album.tracktotal: + if len([i for i in album.items()]) < album.tracktotal: # fetch missing items # TODO: Implement caching that without breaking other stuff album_info = hooks._album_for_id(album.mb_albumid)