diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2005-10-15 16:37:46 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2005-10-15 16:37:46 +0000 |
commit | 84e9ed7e1247c2d6f5a2185e67a9bf2fd6c0592d (patch) | |
tree | f00bc26511b1da73c609186ce0f3da320c0ce4a7 | |
parent | 4de3d854b21d3e66d5a247473fb2e5a17e892560 (diff) | |
download | libgpod-tmz-84e9ed7e1247c2d6f5a2185e67a9bf2fd6c0592d.tar.gz libgpod-tmz-84e9ed7e1247c2d6f5a2185e67a9bf2fd6c0592d.tar.xz libgpod-tmz-84e9ed7e1247c2d6f5a2185e67a9bf2fd6c0592d.zip |
fixed 64 bit isssues (forgot one G_UINT_TO_POINTER)
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1123 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r-- | src/itdb_itunesdb.c | 34 | ||||
-rw-r--r-- | src/itdb_playlist.c | 2 |
2 files changed, 20 insertions, 16 deletions
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index 9ba3b83..1cba8a9 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -1,4 +1,4 @@ -/* Time-stamp: <2005-10-15 23:47:29 jcs> +/* Time-stamp: <2005-10-16 01:28:35 jcs> | | Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. @@ -1410,7 +1410,6 @@ static glong get_mhip (FImport *fimp, Itdb_Playlist *plitem, guint32 mhip_hlen, mhip_len, mhod_num, mhod_seek; Itdb_Track *tr; gint32 i, pos=-1; - guint32 posid = -1; gint32 mhod_type; guint32 trackid; @@ -1463,20 +1462,25 @@ static glong get_mhip (FImport *fimp, Itdb_Playlist *plitem, { MHODData mhod; mhod = get_mhod (cts, mhod_seek, &mhod_len); - if (mhod.valid) - posid = mhod.data.track_pos; CHECK_ERROR (fimp, -1); - /* The posids don't have to be in numeric order, but our - database depends on the playlist members being sorted - according to the order they appear in the - playlist. Therefore we need to find out at which - position to insert the track */ - fimp->pos_glist = g_list_insert_sorted ( - fimp->pos_glist, GUINT_TO_POINTER(posid), - (GCompareFunc)pos_comp); - pos = g_list_index (fimp->pos_glist, (gpointer)posid); - /* for speedup: pos==-1 is appending at the end */ - if (pos == fimp->pos_len) pos = -1; + pos = -1; + if (mhod.valid) + { + /* The posids don't have to be in numeric order, but our + database depends on the playlist members being sorted + according to the order they appear in the + playlist. Therefore we need to find out at which + position to insert the track */ + fimp->pos_glist = g_list_insert_sorted ( + fimp->pos_glist, + GUINT_TO_POINTER(mhod.data.track_pos), + (GCompareFunc)pos_comp); + pos = g_list_index ( + fimp->pos_glist, + GUINT_TO_POINTER(mhod.data.track_pos)); + /* for speedup: pos==-1 is appending at the end */ + if (pos == fimp->pos_len) pos = -1; + } break; } else diff --git a/src/itdb_playlist.c b/src/itdb_playlist.c index ba49b17..e8a6f18 100644 --- a/src/itdb_playlist.c +++ b/src/itdb_playlist.c @@ -1,4 +1,4 @@ -/* Time-stamp: <2005-10-15 22:28:58 jcs> +/* Time-stamp: <2005-10-16 01:30:04 jcs> | | Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. |