Skip to content

Commit

Permalink
paned: Fix a few filter() calls expecting list results. See #2638
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Dec 13, 2017
1 parent 3d72b9e commit d1fcb9b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions quodlibet/quodlibet/browsers/paned/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ def __select_all(self, *args):
self._panes[-1].get_selection().emit('changed')

def __added(self, library, songs):
songs = filter(self._filter, songs)
songs = list(filter(self._filter, songs))
for pane in self._panes:
pane.add(songs)
songs = filter(pane.matches, songs)
songs = list(filter(pane.matches, songs))

def __removed(self, library, songs, remove_if_empty=True):
songs = filter(self._filter, songs)
songs = list(filter(self._filter, songs))
for pane in self._panes:
pane.remove(songs, remove_if_empty)

Expand Down Expand Up @@ -187,10 +187,10 @@ def activate(self):
query = Query(self._get_text(), star.keys())
if query.is_parsable:
self._filter = query.search
songs = filter(self._filter, self._library)
songs = list(filter(self._filter, self._library))
bg = background_filter()
if bg:
songs = filter(bg, songs)
songs = list(filter(bg, songs))
self._panes[0].fill(songs)

def scroll(self, song):
Expand Down

0 comments on commit d1fcb9b

Please sign in to comment.