diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2007-06-23 05:10:26 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2007-06-23 05:10:26 +0000 |
commit | 4f7cc77452066f62f1b8a43c813b58debc96bf95 (patch) | |
tree | 059842d1add3431644f3dec1bdc4c42812fbc9c8 | |
parent | 05231bcd762ea6a47f2ee92bb9ec0a2e78dada37 (diff) | |
download | libgpod-4f7cc77452066f62f1b8a43c813b58debc96bf95.tar.gz libgpod-4f7cc77452066f62f1b8a43c813b58debc96bf95.tar.xz libgpod-4f7cc77452066f62f1b8a43c813b58debc96bf95.zip |
* src/itdb_itunesdb.c (mhod52_make_collate_keys): ignore empty
sort strings -- fixes multiple display of same album on the
iPod.
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1580 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/itdb_itunesdb.c | 15 |
2 files changed, 15 insertions, 6 deletions
@@ -1,3 +1,9 @@ +2007-06-23 Jorg Schuler <jcsjcs at users.sourceforge.net> + + * src/itdb_itunesdb.c (mhod52_make_collate_keys): ignore empty + sort strings -- fixes multiple display of same album on the + iPod. + 2007-06-18 Jorg Schuler <jcsjcs at users.sourceforge.net> * TROUBLESHOOTING: comment concerning namespace cleanup diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index 7803def..d4beb3b 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -229,7 +229,10 @@ enum MHOD52_SORTTYPE { MHOD52_SORTTYPE_ALBUM = 0x04, MHOD52_SORTTYPE_ARTIST = 0x05, MHOD52_SORTTYPE_GENRE = 0x07, - MHOD52_SORTTYPE_COMPOSER = 0x12 + MHOD52_SORTTYPE_COMPOSER = 0x12/*, + MHOD52_SORTTYPE_TVSHOW = 0x1d, + MHOD52_SORTTYPE_TVSEASON = 0x1e, + MHOD52_SORTTYPE_TVEPISODE= 0x1f*/ }; struct mhod52track @@ -3705,7 +3708,7 @@ static GList *mhod52_make_collate_keys (GList *tracks) coltracks = g_list_prepend (coltracks, ct); /* album */ - if (tr->sort_album) + if (tr->sort_album && *tr->sort_album) { ct->album = g_utf8_collate_key (tr->sort_album, -1); } @@ -3719,7 +3722,7 @@ static GList *mhod52_make_collate_keys (GList *tracks) } /* title */ - if (tr->sort_title) + if (tr->sort_title && *tr->sort_title) { ct->title = g_utf8_collate_key (tr->sort_title, -1); } @@ -3759,7 +3762,7 @@ static GList *mhod52_make_collate_keys (GList *tracks) } /* composer */ - if (tr->sort_composer) + if (tr->sort_composer && *tr->sort_composer) { ct->composer = g_utf8_collate_key (tr->sort_composer, -1); } @@ -4652,10 +4655,10 @@ static gboolean write_playlist (FExport *fexp, mhod.data.mhod52coltracks = mhod52_make_collate_keys (pl->members); mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_TITLE; mk_mhod (fexp, &mhod); - mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_ALBUM; - mk_mhod (fexp, &mhod); mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_ARTIST; mk_mhod (fexp, &mhod); + mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_ALBUM; + mk_mhod (fexp, &mhod); mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_GENRE; mk_mhod (fexp, &mhod); mhod.data2.mhod52sorttype = MHOD52_SORTTYPE_COMPOSER; |