]> git.sesse.net Git - vlc/blobdiff - src/playlist/sort.c
Sort the playlist by album then by track number when sorting by album.
[vlc] / src / playlist / sort.c
index 34e69737e3e3817ac6660038dcc3f246a41df32d..992b0357cb7662fd6b96aa2a145a34046e692041 100644 (file)
@@ -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 )
             {