Right click->append or drag from collection panel after search does not work

Bug #428903 reported by Adam Olsen
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Critical
Adam Olsen

Bug Description

Exaile trunk

Steps to reproduce:

1. Enter a search term in the search box in the collection panel that returns more than one result.
2. Right click one of the items (not the last item), go to append or Queue
3. Track is not added to the playlist. Only the last returned by the search works.

It's something wrong in get_selected_tracks in the collection panel. It builds a search term based on the currently selected items, and calls:

tracks = self.collection.search(search_terms, self.tracks)

It looks in the "self.tracks" subset, but for each iteration of the search, self.tracks is set to the current iteration of search terms, meaning that it's contents only include the last iteration. See panel/collection.py, line 621:

618 try:
619 tag = self.order[depth]
620
621 self.tracks = self.collection.search(search)
622 if previously_loaded: # leave after setting self.tracks, so _find_tracks searches right branch
623 return
624
625 sort_by = []
626 if depth > 0 and self.order[depth-1] == "tracknumber":
627 sort_by = ['discnumber', 'tracknumber']

This is part of the function "load_subtree", which gets called for each single item that gets returned, causing the search to fail.

reacocard (reacocard)
Changed in exaile:
milestone: 0.3.0.2 → 0.3.1
Revision history for this message
Adam Olsen (arolsen) wrote :

Fixed in r2528

Changed in exaile:
assignee: nobody → Adam Olsen (arolsen)
status: New → Fix Committed
reacocard (reacocard)
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.