Bug 389130 - Track Sorting
Summary: Track Sorting
Status: RESOLVED FIXED
Alias: None
Product: juk
Classification: Applications
Component: general (other bugs)
Version First Reported In: 17.12.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Kacper Kasper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-17 20:33 UTC by tywigi
Modified: 2018-02-11 00:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tywigi 2018-01-17 20:33:29 UTC
When album sorting is selected Juk music player does sort music tracks in numerical order. (tracks will not arrange in ascending order.
Comment 1 Kacper Kasper 2018-01-26 22:51:17 UTC
I have local changes that fix this.
Comment 2 Kacper Kasper 2018-01-28 14:13:26 UTC
Git commit 81c0dcc278a9c17fb96e0b41ab34bc32fb2c289e by Kacper Kasper.
Committed on 28/01/2018 at 14:13.
Pushed by kkasper into branch 'master'.

Fix columns sorting.

Summary:
QTreeWidgetItem in Qt5 requires overloading < operator to implement
custom sorting. Use existing compare methods to do that.

Additionally, natural sorting was implemented for strings.
This allows to sort by filenames like file_<number>.

Test Plan:
Click on columns to sort them.
Columns are sorted by artist, album and track number.

Reviewers: mpyne

Differential Revision: https://phabricator.kde.org/D10130

M  +24   -8    playlistitem.cpp
M  +3    -1    playlistitem.h

https://commits.kde.org/juk/81c0dcc278a9c17fb96e0b41ab34bc32fb2c289e
Comment 3 Michael Pyne 2018-02-11 00:05:49 UTC
Git commit cd8e92003e0bf4806af3d8bb8d7a1fba7ea5cdb7 by Michael Pyne, on behalf of Kacper Kasper.
Committed on 10/02/2018 at 22:47.
Pushed by mpyne into branch 'Applications/17.12'.

Fix columns sorting.

Summary:
QTreeWidgetItem in Qt5 requires overloading < operator to implement
custom sorting. Use existing compare methods to do that.

Additionally, natural sorting was implemented for strings.
This allows to sort by filenames like file_<number>.

Test Plan:
Click on columns to sort them.
Columns are sorted by artist, album and track number.

Reviewers: mpyne

Differential Revision: https://phabricator.kde.org/D10130

M  +24   -8    playlistitem.cpp
M  +3    -1    playlistitem.h

https://commits.kde.org/juk/cd8e92003e0bf4806af3d8bb8d7a1fba7ea5cdb7