|
From: <jc...@us...> - 2005-11-13 05:13:23
|
Update of /cvsroot/gtkpod/libgpod/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1374/src Modified Files: itdb.h itdb_itunesdb.c Log Message: * src/itdb_itunesdb.c: when new rating is set on the iPod, backup the old rating to app_rating. Not sure what it's for, but iTunes seem to do it. Index: itdb.h =================================================================== RCS file: /cvsroot/gtkpod/libgpod/src/itdb.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- itdb.h 12 Nov 2005 04:18:53 -0000 1.17 +++ itdb.h 13 Nov 2005 05:13:10 -0000 1.18 @@ -1,4 +1,4 @@ -/* Time-stamp: <2005-11-10 00:10:05 jcs> +/* Time-stamp: <2005-11-13 14:11:50 jcs> | | Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. @@ -510,7 +510,11 @@ guint32 recent_playcount; /* times track was played since last sync */ gboolean transferred; /* has file been transferred to iPod? */ gint16 BPM; /* supposed to vary the playback speed */ - guint8 app_rating; /* star rating set by appl. (not iPod) */ + guint8 app_rating; /* star rating set by appl. (not + * iPod). If the rating set on the iPod + and the rating field above differ, the + original rating is copied here and the + new rating is stored above. */ guint16 type; /* CBR MP3s are type 0x100, VBR MP3s are type 0x101, AAC are type 0x0 */ guint8 compilation; Index: itdb_itunesdb.c =================================================================== RCS file: /cvsroot/gtkpod/libgpod/src/itdb_itunesdb.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- itdb_itunesdb.c 12 Nov 2005 04:18:53 -0000 1.28 +++ itdb_itunesdb.c 13 Nov 2005 05:13:10 -0000 1.29 @@ -1,4 +1,4 @@ -/* Time-stamp: <2005-11-11 22:44:42 jcs> +/* Time-stamp: <2005-11-13 14:11:49 jcs> | | Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. @@ -1930,8 +1930,14 @@ if (playcount) { if (playcount->rating != NO_PLAYCOUNT) - track->rating = playcount->rating; - + { + if (track->rating != playcount->rating) + { + /* backup original rating to app_rating */ + track->app_rating = track->rating; + track->rating = playcount->rating; + } + } if (playcount->time_played) track->time_played = playcount->time_played; |