[vlc-devel] commit: when sorting playlist with artist, sort also album under artist and tracknumber on album (Ilkka Ollakka )

git version control git at videolan.org
Fri Mar 14 07:34:17 CET 2008


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Mar 14 08:32:49 2008 +0200| [ba274b8b207a49037bd383ac250b530f98b3c65f]

when sorting playlist with artist, sort also album under artist and tracknumber on album
I think this is good default atleast on music.

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

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

diff --git a/src/playlist/sort.c b/src/playlist/sort.c
index 00adf9f..7a2a03b 100644
--- a/src/playlist/sort.c
+++ b/src/playlist/sort.c
@@ -187,6 +187,11 @@ static int playlist_cmp(const void *first, const void *second)
     else if( sort_mode == SORT_ARTIST )
     {
         DO_META_SORT( Artist );
+        /* sort by artist, album, tracknumber */
+        if( i_test == 0 )
+            DO_META_SORT( Album );
+        if( i_test == 0 )
+            DO_META_SORT_ADV( TrackNumber, VLC_TRUE );
     }
     else if( sort_mode == SORT_GENRE )
     {




More information about the vlc-devel mailing list