commit 959faa13f7712fc3b929f7b34bded19ba9e1fd52 Author: Nikias Bassen <nik...@gmx.li> Date: Mon Oct 4 02:00:47 2010 +0200
write empty mhsd of type 10 Found since iOS4. We don't know yet what this is for -- this is for completeness. src/itdb_itunesdb.c | 28 +++++++++++++++++++++++++++- 1 files changed, 27 insertions(+), 1 deletions(-) --- diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index 921325c..7f587bf 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -5669,6 +5669,23 @@ static gboolean write_genius_mhsd (FExport *fexp) return TRUE; } +static gboolean write_mhsd_type10 (FExport *fexp) +{ + gulong mhsd_seek; + WContents *cts; + + g_return_val_if_fail (fexp, FALSE); + g_return_val_if_fail (fexp->itdb, FALSE); + g_return_val_if_fail (fexp->wcontents, FALSE); + + cts = fexp->wcontents; + mhsd_seek = cts->pos; /* get position of mhsd header */ + mk_mhsd (fexp, 10); /* write header */ + mk_mhlt (fexp, 0); /* for now, produce an empty set */ + fix_header (cts, mhsd_seek); + return TRUE; +} + /* create a WContents structure */ static WContents *wcontents_new (const gchar *filename) { @@ -5956,7 +5973,7 @@ static gboolean itdb_write_file_internal (Itdb_iTunesDB *itdb, #endif /* default mhsd count */ - num_mhsds = 7; /* seven mhsds */ + num_mhsds = 8; /* eight mhsds */ /* if genius_cuid present, we have one more */ if (fexp->itdb->priv->genius_cuid) { @@ -6017,6 +6034,15 @@ static gboolean itdb_write_file_internal (Itdb_iTunesDB *itdb, goto err; } + /* write empty mhsd type 10, whatever it is */ + if (!fexp->error && !write_mhsd_type10 (fexp)) { + g_set_error (&fexp->error, + ITDB_FILE_ERROR, + ITDB_FILE_ERROR_ITDB_CORRUPT, + _("Error writing mhsd type 10")); + goto err; + } + /* write mhsd5 playlists */ if (!fexp->error && !write_mhsd_playlists (fexp, 5)) { g_set_error (&fexp->error, ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2