From fad5dff9da900de68e287c5a3fe214f907ad90e6 Mon Sep 17 00:00:00 2001 From: jcsjcs Date: Wed, 28 May 2008 13:31:53 +0000 Subject: * src/itdb_track.c (itdb_track_set_thumbnails_internal): set artwork ID to 0 after removing thumbnails. * src/db-artwork-parser.c (parse_mhii): move out dbid association to a separate function. (mhfd_associate_itunesdb_artwork): handle dbid and mhii_link association of artwork to track (parse_mhfd): loop over the number of mhsd hunks instead of hardcoding it. Call mhfd_associate_itunesdb_artwork(). * src/itdb_itunesdb.c (get_mhit): read the mhii_link field. * src/db-artwork-writer.c (write_mhli): handle unset artwork correctly. (itdb_track_filter_thumbnails): remove thumbnails correctly. * src/db-parse-context.c (db_parse_context_get_sub_context): copy newly introduced artwork field. * tests/test-covers.c: print mhii_link. * src/itdb.h: (Itdb_Track) added mhii_link. (Itdb_Artwork): added dbid. * src/itdb.h, src/db-artwork-parser.c, src/db-artwork-writer.c, src/itdb_device.c, src/ithumb-writer.c, src/itdb_artwork.c: added ITDB_THUMB_CHAPTER_SMALL/LARGE. * src/itdb_device.c: ipod_classic_1_artwork_info: correct ITDB_THUMB_COVER_SMALL/LARGE entries. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1985 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- src/itdb_itunesdb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/itdb_itunesdb.c') diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index be846f4..cab04bb 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -2353,6 +2353,11 @@ static glong get_mhit (FImport *fimp, glong mhit_seek) track->gapless_track_flag = get16lint (cts, seek+256); track->gapless_album_flag = get16lint (cts, seek+258); } + /* 200805 */ + if (header_len >= 0x184) + { + track->mhii_link = get32lint (cts, seek+352); + } track->transferred = TRUE; /* track is on iPod! */ @@ -3641,8 +3646,7 @@ static void mk_mhit (WContents *cts, Itdb_Track *track) put16lint (cts, track->gapless_album_flag); put32_n0 (cts, 23); put32lint (cts, track->id); /* Needed on fat nanos/ipod classic to get art - * in the right sidepane - */ + * in the right sidepane (mhii_link) */ put32_n0 (cts, 8); /* padding */ } -- cgit