From 11982bc1e4d9f07553b8070c46057bdc5593ff6a Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Fri, 31 Oct 2008 20:25:17 +0100 Subject: [PATCH] consider disc number while sorting tracks in media library --- src/helpers.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers.cpp b/src/helpers.cpp index 2fe4e962..e24a1d05 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -243,7 +243,10 @@ bool Keypressed(int in, const int *key) bool SortSongsByTrack(Song *a, Song *b) { - return StrToInt(a->GetTrack()) < StrToInt(b->GetTrack()); + if (a->GetDisc() == b->GetDisc()) + return StrToInt(a->GetTrack()) < StrToInt(b->GetTrack()); + else + return StrToInt(a->GetDisc()) < StrToInt(b->GetDisc()); } void WindowTitle(const string &status)