commit 23897dd66012fa0674c88a570007b8cca56cf8ba
Author: Christophe Fergeau <[email protected]>
Date: Sat Oct 17 15:43:38 2009 +0200
album_id is a 32 bit value
To preserve ABI compatibility, we can't just change the field type in
Itdb_Track. So we obsolete the guint16 field and add a new one in Itdb_Track
private data.
src/itdb.h | 4 +---
src/itdb_itunesdb.c | 6 +++---
src/itdb_private.h | 1 +
3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/itdb.h b/src/itdb.h
index 97bbd4e..edf4ca6 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -993,8 +993,6 @@ struct _Itdb_iTunesDB
* @unk028: Unknown, seems to be always 0
* @unk044: Unknown, seems to always be 0
* @unk048: Unknown, seems to always be 0
- * @album_id: The id of the album. This is set automatically when
- * the PhotoDB is written.
* @prev_album_id: The id of the previous playlist. This is set
* automatically when the PhotoDB is written.
* @reserved_int1: Reserved for future use
@@ -1629,7 +1627,7 @@ struct _Itdb_Track
guint32 unk252;
guint16 gapless_track_flag;
guint16 gapless_album_flag;
- guint16 album_id;
+ guint16 obsolete;
/* This is for Cover Art support */
struct _Itdb_Artwork *artwork;
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 81730ad..0d50bee 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -3738,7 +3738,7 @@ static void mk_mhit (WContents *cts, Itdb_Track *track)
put16lint (cts, track->gapless_album_flag);
put32_n0 (cts, 7);
/* +0x120 */
- put32lint (cts, track->album_id);
+ put32lint (cts, track->priv->album_id);
put64lint (cts, track->itdb->priv->id_0x24); /* same as mhbd+0x24, purpose
unknown */
put32lint (cts, track->size); /* seems to be filesize again */
/* +0x130 */
@@ -5367,11 +5367,11 @@ static void prepare_itdb_for_write (FExport *fexp)
/* album ids are used when writing the mhla header */
id = GPOINTER_TO_UINT (g_hash_table_lookup (fexp->albums, track));
if (id != 0) {
- track->album_id = id;
+ track->priv->album_id = id;
} else {
g_hash_table_insert (fexp->albums, track,
GUINT_TO_POINTER (album_id));
- track->album_id = album_id;
+ track->priv->album_id = album_id;
album_id++;
}
}
diff --git a/src/itdb_private.h b/src/itdb_private.h
index f475dd4..67bec7c 100644
--- a/src/itdb_private.h
+++ b/src/itdb_private.h
@@ -171,6 +171,7 @@ struct _Itdb_iTunesDB_Private
/* private data for Itdb_Track */
struct _Itdb_Track_Private {
+ guint32 album_id;
};
G_GNUC_INTERNAL gboolean itdb_spl_action_known (ItdbSPLAction action);
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2