[rhythmbox] rhythmdb: don't complain about duplicate entries in the same set of types



commit 9606d2fe25ad2fbb6eca64ef733738d778141dfb
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Sep 23 15:08:37 2012 +1000

    rhythmdb: don't complain about duplicate entries in the same set of types
    
    This warning is only really interesting in cases where unrelated things
    are trying to use the same location for their own entry types.

 rhythmdb/rhythmdb.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index f28f80d..0d331b4 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -2101,14 +2101,20 @@ rhythmdb_process_stat_event (RhythmDB *db,
 			guint64 new_size;
 
 			/* update the existing entry, as long as the entry type matches */
-			if ((event->entry_type != NULL) && (entry->type != event->entry_type)) {
+			if ((event->entry_type != NULL) &&
+			    (entry->type != event->entry_type) &&
+			    (entry->type != event->ignore_type) &&
+			    (entry->type != event->error_type)) {
 				if (event->entry_type == RHYTHMDB_ENTRY_TYPE_SONG &&
 				    entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST) {
 					rb_debug ("Ignoring stat event for '%s', it's already loaded as a podcast",
 						  rb_refstring_get (event->real_uri));
 					break;
 				}
-				g_warning ("attempt to use same location in multiple entry types");
+				g_warning ("attempt to use location %s in multiple entry types (%s and %s)",
+					   rb_refstring_get (event->real_uri),
+					   rhythmdb_entry_type_get_name (event->entry_type),
+					   rhythmdb_entry_type_get_name (entry->type));
 			}
 
 			if (entry->type == event->ignore_type)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]