rhythmbox r5554 - in trunk: . rhythmdb



Author: jmatthew
Date: Sun Jan 27 02:15:14 2008
New Revision: 5554
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5554&view=rev

Log:
2008-01-27  Jonathan Matthew  <jonathan d14n org>

	* rhythmdb/rhythmdb.c: (rhythmdb_add_import_error_entry),
	(rhythmdb_missing_plugins_cb), (default_sync_metadata):
	Don't pass in NULL for error/ignore entry types, and if we don't have
	a valid entry type for error entries, don't create one.  Probably
	fixes #510236.


Modified:
   trunk/ChangeLog
   trunk/rhythmdb/rhythmdb.c

Modified: trunk/rhythmdb/rhythmdb.c
==============================================================================
--- trunk/rhythmdb/rhythmdb.c	(original)
+++ trunk/rhythmdb/rhythmdb.c	Sun Jan 27 02:15:14 2008
@@ -1809,6 +1809,9 @@
 			return;
 
 		error_entry_type = event->ignore_type;
+	} else if (event->error_type == RHYTHMDB_ENTRY_TYPE_INVALID) {
+		/* we don't have an error entry type, so we can't add an import error */
+		return;
 	}
 
 	entry = rhythmdb_entry_lookup_by_location_refstring (db, event->real_uri);
@@ -1995,6 +1998,8 @@
 		load_action->type = RHYTHMDB_ACTION_LOAD;
 		load_action->uri = rb_refstring_ref (event->real_uri);
 		load_action->entry_type = RHYTHMDB_ENTRY_TYPE_INVALID;
+		load_action->ignore_type = RHYTHMDB_ENTRY_TYPE_INVALID;
+		load_action->error_type = RHYTHMDB_ENTRY_TYPE_INVALID;
 		g_async_queue_push (event->db->priv->action_queue, load_action);
 	} else {
 		/* TODO replace event->error with something like
@@ -4165,6 +4170,9 @@
 		RhythmDBAction *load_action;
 
 		/* reload the metadata, to revert the db changes */
+		rb_debug ("error saving metadata for %s: %s; reloading metadata to revert",
+			  rb_refstring_get (entry->location),
+			  local_error->message);
 		load_action = g_new0 (RhythmDBAction, 1);
 		load_action->type = RHYTHMDB_ACTION_LOAD;
 		load_action->uri = rb_refstring_ref (entry->location);



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