commit 8ee9803c77bfe6799b2082e592020783182409a4
Author: Alex Mauer "hawke <ha...@hawkesnest.net>
Date:   Wed Jul 21 18:40:17 2010 +0200

    take into account tvshow field in album comparison

 src/itdb_itunesdb.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 4c664e1..db59414 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -5529,10 +5529,20 @@ static gboolean itdb_album_equal (gconstpointer v1, 
gconstpointer v2)
 {
   Itdb_Track *track1 = (Itdb_Track *)v1;
   Itdb_Track *track2 = (Itdb_Track *)v2;
+  gboolean same_show;
   gboolean same_album;
 
-  same_album = safe_str_equal (track1->album, track2->album);
+  /*album is the same if:
+   * tvshow is the same, and
+   * album and albumartist are the same, or
+   * albumartist is null and artist and album are the same
+   */ 
+  same_show = safe_str_equal (track1->tvshow, track2->tvshow);
+  if (!same_show) {
+      return FALSE;
+  }
 
+  same_album = safe_str_equal (track1->album, track2->album);
   if (!same_album) {
       return FALSE;
   }

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to