commit 28f8a200879a9fe90ba599c14885746b614c9142
Author: Christophe Fergeau <[email protected]>
Date: Wed Nov 11 15:54:27 2009 +0100
parse "purchase_type" field when reading a playlist
src/itdb_itunesdb.c | 3 +++
src/itdb_private.h | 12 ++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index eb29945..84713f3 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -2036,6 +2036,9 @@ static glong get_playlist (FImport *fimp, glong mhyp_seek)
/* plitem->libmhodcount = get16lint (cts, mhyp_seek+40);*/
plitem->podcastflag = get16lint (cts, mhyp_seek+42);
plitem->sortorder = get32lint (cts, mhyp_seek+44);
+ if (header_len >= 0x6C) {
+ plitem->priv->purchase_type = get16lint (cts, mhyp_seek+0x50);
+ }
mhod_seek = mhyp_seek + header_len;
diff --git a/src/itdb_private.h b/src/itdb_private.h
index c190251..f347f65 100644
--- a/src/itdb_private.h
+++ b/src/itdb_private.h
@@ -164,6 +164,17 @@ struct _Itdb_Item_Id {
};
typedef struct _Itdb_Item_Id Itdb_Item_Id;
+enum _Itdb_Playlist_Purchase_Type {
+ ITDB_PLAYLIST_PURCHASE_NONE = 0,
+ ITDB_PLAYLIST_PURCHASE_MOVIES = 2,
+ ITDB_PLAYLIST_PURCHASE_TV_SHOWS = 3,
+ ITDB_PLAYLIST_PURCHASE_MUSIC = 4,
+ ITDB_PLAYLIST_PURCHASE_AUDIOBOOKS = 5,
+ ITDB_PLAYLIST_PURCHASE_RINGTONES = 6,
+ ITDB_PLAYLIST_PURCHASE_MOVIE_RENTALS = 7
+};
+typedef enum _Itdb_Playlist_Purchase_Type Itdb_Playlist_Purchase_Type;
+
struct _Itdb_iTunesDB_Private
{
guint16 unk_0x22;
@@ -186,6 +197,7 @@ struct _Itdb_Track_Private {
};
struct _Itdb_Playlist_Private {
+ Itdb_Playlist_Purchase_Type purchase_type;
};
G_GNUC_INTERNAL gboolean itdb_spl_action_known (ItdbSPLAction action);
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2