summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/itdb.h8
-rw-r--r--src/itdb_itunesdb.c12
2 files changed, 15 insertions, 5 deletions
diff --git a/src/itdb.h b/src/itdb.h
index d039c61..33ba6f6 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -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 @@ typedef struct
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;
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index fd1a95a..c2b32e7 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -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 @@ static glong get_mhit (FImport *fimp, glong mhit_seek)
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;