[vlc-devel] commit: Sort the playlist by album then by track number when sorting by album. ( Rémi Duraffort )

git version control git at videolan.org
Sat Mar 8 19:17:00 CET 2008


vlc | branch: master | Rémi Duraffort <ivoire at via.ecp.fr> | Sat Mar  8 18:11:22 2008 +0100| [438d9dee9b3d7d1623e64c1dd73d4dc96068d180]

Sort the playlist by album then by track number when sorting by album.
Close #1492.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=438d9dee9b3d7d1623e64c1dd73d4dc96068d180
---

 src/playlist/sort.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/playlist/sort.c b/src/playlist/sort.c
index 34e6973..992b035 100644
--- a/src/playlist/sort.c
+++ b/src/playlist/sort.c
@@ -188,6 +188,9 @@ static int playlist_ItemArraySort( playlist_t *p_playlist, int i_items,
             else if( i_mode == SORT_ALBUM )
             {
                 DO_META_SORT( Album );
+                /* Sort by tracknumber if albums are the same */
+                if( i_test == 0 )
+                    DO_META_SORT_ADV( TrackNumber, VLC_TRUE );
             }
             else if( i_mode == SORT_TRACK_NUMBER )
             {




More information about the vlc-devel mailing list