[rhythmbox] rhythmdb: don't overwrite metadata for existing entries of different types



commit 384935909df28495754ed0561b865d303364c131
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Dec 5 15:21:58 2009 +1000

    rhythmdb: don't overwrite metadata for existing entries of different types
    
    This was probably messing up podcast episodes by setting properties from
    the file tags (which may be correct, or they may be nonexistant or junk)
    when newly downloaded files are picked up by the library monitor.

 rhythmdb/rhythmdb.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index c4c3961..5b1c652 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -2377,8 +2377,10 @@ rhythmdb_process_metadata_load_real (RhythmDBEvent *event)
 		g_value_unset (&value);
 	}
 
-	if ((event->entry_type != RHYTHMDB_ENTRY_TYPE_INVALID) && (entry->type != event->entry_type))
+	if ((event->entry_type != RHYTHMDB_ENTRY_TYPE_INVALID) && (entry->type != event->entry_type)) {
 		g_warning ("attempt to use same location in multiple entry types");
+		return TRUE;
+	}
 
 	/* mtime */
 	if (event->file_info) {



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