Skip to content

Commit

Permalink
panel/files: Make get_selected_tracks sort using BASE_SORT_TAGS.
Browse files Browse the repository at this point in the history
Another attempt at #290 which should be good enough for most people.
  • Loading branch information
sjohannes committed Apr 22, 2017
1 parent f68981c commit 393260b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions xlgui/panel/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,16 +500,9 @@ def get_selected_tracks(self):

for path in paths:
f = model[path][0]

dtracks = []
self.append_recursive(dtracks, f)

# don't sort all the tracks; this only is needed if the selected
# items is a directory
dtracks.sort(key=lambda t: t.get_tag_sort('title'))
tracks.extend(dtracks)

return tracks
self.append_recursive(tracks, f)

return trax.sort_tracks(common.BASE_SORT_TAGS, tracks, artist_compilations=True)

def append_recursive(self, songs, f):
"""
Expand Down

0 comments on commit 393260b

Please sign in to comment.