diff --git a/src/itdb.h b/src/itdb.h index 2cd6f5a..b564691 100644 --- a/src/itdb.h +++ b/src/itdb.h @@ -1271,6 +1271,7 @@ typedef enum ITDB_MEDIATYPE_MEMO = (1 << 20), ITDB_MEDIATYPE_ITUNES_U = (1 << 21), ITDB_MEDIATYPE_EPUB_BOOK = (1 << 22) + ITDB_MEDIATYPE_PDF_BOOK = (1 << 23) } Itdb_Mediatype; /* Known compound media types which have been observed in iPod databases. diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index e9dc7cd..1e01c59 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -4011,7 +4011,15 @@ static void mk_mhit (WContents *cts, Itdb_Track *track) put64lint (cts, 0x808080808080LL); /* what the heck is this?! */ put32lint (cts, 0); /* +0x140 */ - put32_n0 (cts, 8); + put32_n0 (cts, 2); + if ((track->mediatype & ITDB_MEDIATYPE_EPUB_BOOK) + || (track->mediatype & ITDB_MEDIATYPE_PDF_BOOK)) { + put16lint (cts, 1); + put16lint (cts, 1); + } else { + put32lint (cts, 0); + } + put32_n0 (cts, 5); /* +0x160 */ /* mhii_link is needed on fat nanos/ipod classic to get artwork * in the right sidepane. This matches mhii::song_id in the ArtworkDB */