commit b2592bb20cb4bd669cb8d8761aaf7430a5b0c6ad
Author: Christophe Fergeau <t...@gnome.org>
Date:   Fri Oct 1 12:01:40 2010 +0200

    Add ebook support
    
    Patch from wuda

 src/itdb.h          |    3 ++-
 src/itdb_itunesdb.c |   10 +++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/itdb.h b/src/itdb.h
index 2cd6f5a..645fb5d 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -1270,7 +1270,8 @@ typedef enum
     ITDB_MEDIATYPE_ITUNES_EXTRA = (1 << 16),
     ITDB_MEDIATYPE_MEMO         = (1 << 20),
     ITDB_MEDIATYPE_ITUNES_U     = (1 << 21),
-    ITDB_MEDIATYPE_EPUB_BOOK    = (1 << 22)
+    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 */

------------------------------------------------------------------------------
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

Reply via email to