Revision: 1711
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1711&view=rev
Author: jcsjcs
Date: 2007-10-01 08:28:49 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
* src/itdb_itunesdb.c (mk_mhit): write extended mhit header for
new iPod Nanos and Classics so they display artwork (Christophe)
* src/db-artwork-writer (ipod_artwork_set_ids): modify the
assignment of IDs for artwork (Christophe)
* src/itdb_device.c: added artwork definition file (cover only)
for iPod Nano Videos (3G). Thanks to Simon Schulz.
Modified Paths:
--------------
libgpod/trunk/ChangeLog
libgpod/trunk/src/db-artwork-writer.c
libgpod/trunk/src/itdb_device.c
libgpod/trunk/src/itdb_itunesdb.c
Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog 2007-09-30 20:00:17 UTC (rev 1710)
+++ libgpod/trunk/ChangeLog 2007-10-01 15:28:49 UTC (rev 1711)
@@ -1,3 +1,14 @@
+2007-09-26 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+ * src/itdb_itunesdb.c (mk_mhit): write extended mhit header for
+ new iPod Nanos and Classics so they display artwork (Christophe)
+
+ * src/db-artwork-writer (ipod_artwork_set_ids): modify the
+ assignment of IDs for artwork (Christophe)
+
+ * src/itdb_device.c: added artwork definition file (cover only)
+ for iPod Nano Videos (3G). Thanks to Simon Schulz.
+
2007-09-30 Christophe Fergeau <[EMAIL PROTECTED]>
* src/itdb_itunesdb.c: (itdb_write_checksum): remove debugging g_print
Modified: libgpod/trunk/src/db-artwork-writer.c
===================================================================
--- libgpod/trunk/src/db-artwork-writer.c 2007-09-30 20:00:17 UTC (rev
1710)
+++ libgpod/trunk/src/db-artwork-writer.c 2007-10-01 15:28:49 UTC (rev
1711)
@@ -999,20 +999,22 @@
ipod_artwork_db_set_ids (Itdb_iTunesDB *db)
{
GList *it;
- unsigned int id;
-
- id = 64;
+ unsigned int max_id;
+
+ max_id = 0;
for (it = db->tracks; it != NULL; it = it->next) {
Itdb_Track *song;
song = (Itdb_Track *)it->data;
+ if (max_id <= song->id) {
+ max_id = song->id;
+ }
if (song->artwork->thumbnails != NULL) {
- song->artwork->id = id;
- id++;
+ song->artwork->id = song->id;
}
}
- return id;
+ return max_id;
}
int
Modified: libgpod/trunk/src/itdb_device.c
===================================================================
--- libgpod/trunk/src/itdb_device.c 2007-09-30 20:00:17 UTC (rev 1710)
+++ libgpod/trunk/src/itdb_device.c 2007-10-01 15:28:49 UTC (rev 1711)
@@ -307,6 +307,14 @@
{-1, -1, -1, -1, -1}
};
+static const Itdb_ArtworkFormat ipod_nano3_artwork_info[] = {
+ {ITDB_THUMB_COVER_SMALL, 56, 55, 1061, THUMB_FORMAT_RGB565_LE,
0x1810}, /*pad data to 0x1810 bytes*/
+ {ITDB_THUMB_COVER_LARGE, 320, 320, 1062, THUMB_FORMAT_RGB565_LE},
+ {ITDB_THUMB_COVER_MEDIUM, 128, 128, 1055, THUMB_FORMAT_RGB565_LE},
+ {-1, -1, -1, -1, -1}
+};
+
+
static const Itdb_ArtworkFormat ipod_classic_1_artwork_info[] = {
/* officially 55x55 -- verify! */
{ITDB_THUMB_COVER_XSMALL, 56, 56, 1061, THUMB_FORMAT_RGB565_LE},
@@ -676,7 +684,7 @@
case ITDB_IPOD_GENERATION_NANO_2:
return ipod_nano_artwork_info;
case ITDB_IPOD_GENERATION_NANO_3:
- return NULL; /* FIXME: */
+ return ipod_nano3_artwork_info;
case ITDB_IPOD_GENERATION_VIDEO_1:
case ITDB_IPOD_GENERATION_VIDEO_2:
return ipod_video_artwork_info;
Modified: libgpod/trunk/src/itdb_itunesdb.c
===================================================================
--- libgpod/trunk/src/itdb_itunesdb.c 2007-09-30 20:00:17 UTC (rev 1710)
+++ libgpod/trunk/src/itdb_itunesdb.c 2007-10-01 15:28:49 UTC (rev 1711)
@@ -3500,7 +3500,7 @@
g_return_if_fail (track);
put_header (cts, "mhit");
- put32lint (cts, 0x148);/* header size */
+ put32lint (cts, 0x184);/* header size */
put32lint (cts, -1); /* size of whole mhit -- fill in later */
put32lint (cts, -1); /* nr of mhods in this mhit -- later */
put32lint (cts, track->id); /* track index number */
@@ -3585,7 +3585,11 @@
put32lint (cts, track->unk252);
put16lint (cts, track->gapless_track_flag);
put16lint (cts, track->gapless_album_flag);
- put32_n0 (cts, 17); /* padding */
+ put32_n0 (cts, 23);
+ put32lint (cts, track->id); /* Needed on fat nanos/ipod classic to get art
+ * in the right sidepane
+ */
+ put32_n0 (cts, 8); /* padding */
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2