commit 094afbf96a183195d0a91ac6e753318ed9d031f6
Author: Christophe Fergeau <cferg...@mandriva.com>
Date:   Mon Feb 22 14:38:00 2010 +0100

    fix composer sorting in mhod52 blocks
    
    The iPod expects the mhod52 composer block to be sorted first by
    composer, then by album/track number. If we fail to do that, when
    selecting composer/album/play in the iPod UI, the songs will be played
    back alphabetically by track title instead of being grouped by album as
    expected.
    Bug reported and fixed by Alex T. (agt499)

 src/itdb_itunesdb.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 853bdf4..d375a41 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -3929,6 +3929,12 @@ static gint mhod52_sort_composer (struct mhod52track *a, 
struct mhod52track *b)
 
     result = strcmp (a->composer, b->composer);
     if (result == 0)
+       result = strcmp (a->album, b->album);
+    if (result == 0)
+       result = a->cd_nr - b->cd_nr;
+    if (result == 0)
+       result = a->track_nr - b->track_nr;
+    if (result == 0)
        result = strcmp (a->title, b->title);
     return result;
 }

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to