summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2005-11-13 06:04:55 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2005-11-13 06:04:55 +0000
commit4836d309b560a8d2b47f27a5f6267836908e1f6c (patch)
treeab24fdb083ee451c044a5b1f90cda183977588c6
parentd32962d49727317359846568f8641726fd55509d (diff)
downloadlibgpod-4836d309b560a8d2b47f27a5f6267836908e1f6c.tar.gz
libgpod-4836d309b560a8d2b47f27a5f6267836908e1f6c.tar.xz
libgpod-4836d309b560a8d2b47f27a5f6267836908e1f6c.zip
* src/itdb_itunesdb.c:
* src/itdb.h: split unk164 into flag1, flag2, flag3, and flag4. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1150 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r--ChangeLog3
-rw-r--r--src/itdb.h28
-rw-r--r--src/itdb_itunesdb.c12
3 files changed, 28 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e1e673..2b7a889 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
the old rating to app_rating. Not sure what it's for, but iTunes
seem to do it.
+ * src/itdb_itunesdb.c:
+ * src/itdb.h: split unk164 into flag1, flag2, flag3, and flag4.
+
2005-11-12 Jorg Schuler <jcsjcs at users.sourceforge.net>
* src/itdb_track.c: (itdb_track_set_defaults) only change unk208
diff --git a/src/itdb.h b/src/itdb.h
index 33ba6f6..4312c95 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -1,4 +1,4 @@
-/* Time-stamp: <2005-11-13 14:11:50 jcs>
+/* Time-stamp: <2005-11-13 14:58:18 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -570,17 +570,21 @@ typedef struct
(always 0x01010100?), zero otherwise */
guint32 unk152; /* unknown */
guint32 unk156, unk160;
- guint32 unk164; /* unknown (0x02?) in dbversion 0x0d, for
- podcasts this seems to be set to
- 0x01010102. The 0x10000 bit seems to control
- whether or not iTunes remembers the last
- played position of this song. This will work
- on any song, not just podcasts.
- Assumption:
- Audiobooks also get this bit set by
- default. Assumption2: This is really four
- single byte flags, perhaps? Might want to try
- find various examples and compare them. */
+ guint8 flag1; /* basically unknown. set to 0x02 for
+ * podcasts, 0x00 otherwise. */
+ guint8 flag2; /* "Skip when shuffling" when set to 0x01, set
+ to 0x00 otherwise. .m4b and .aa files always
+ seem to be skipped when shuffling, however */
+ guint8 flag3; /* "Remember playback position" when set to
+ 0x01, set to 0x00 otherwise. .m4b and .aa
+ files always seem to remember the playback
+ position, however. */
+ guint8 flag4; /* Used for podcasts, 0x00 otherwise. If set to
+ 0x01 the "Now Playing" page will show
+ Title/Album, when set to 0x00 it will also
+ show the Artist. When set to 0x02 a sub-page
+ (middle button) with further information
+ about the track will be shown. */
guint64 dbid2; /* not clear. if not set, itdb will set this to
the same value as dbid when adding a track */
guint32 unk176; /* unknown - added in dbversion 0x0c, first
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index c2b32e7..fdbf8b1 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -1,4 +1,4 @@
-/* Time-stamp: <2005-11-13 14:11:49 jcs>
+/* Time-stamp: <2005-11-13 14:58:17 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -1816,7 +1816,10 @@ static glong get_mhit (FImport *fimp, glong mhit_seek)
{
track->unk156 = get32lint (cts, seek+156);
track->unk160 = get32lint (cts, seek+160);
- track->unk164 = get32lint (cts, seek+164);
+ track->flag1 = get8int (cts, seek+164);
+ track->flag2 = get8int (cts, seek+165);
+ track->flag3 = get8int (cts, seek+166);
+ track->flag4 = get8int (cts, seek+167);
track->dbid2 = get64lint (cts, seek+168);
track->unk176 = get32lint (cts, seek+176);
track->unk180 = get32lint (cts, seek+180);
@@ -2716,7 +2719,10 @@ static void mk_mhit (WContents *cts, Itdb_Track *track)
/* since iTunesDB version 0x0c */
put32lint (cts, track->unk156);
put32lint (cts, track->unk160);
- put32lint (cts, track->unk164);
+ put8int (cts, track->flag1);
+ put8int (cts, track->flag2);
+ put8int (cts, track->flag3);
+ put8int (cts, track->flag4);
put64lint (cts, track->dbid2);
put32lint (cts, track->unk176);
put32lint (cts, track->unk180);