rendered paste bodydiff --git a/plugins/ipod/rb-ipod-db.c b/plugins/ipod/rb-ipod-db.cindex 1857486..3474c6f 100644--- a/plugins/ipod/rb-ipod-db.c+++ b/plugins/ipod/rb-ipod-db.c@@ -133,6 +133,7 @@ rb_itdb_save (RbIpodDb *ipod_db, GError **error) if (priv->needs_shuffle_db) { itdb_shuffle_write (priv->itdb, error); }+ itdb_stop_sync (priv->itdb); } static void@@ -859,13 +860,16 @@ rb_ipod_db_save_async (RbIpodDb *ipod_db) RbIpodDbPrivate *priv = IPOD_DB_GET_PRIVATE (ipod_db); if (priv->save_timeout_id == 0) {- rb_debug ("Scheduling iPod database save in 15 seconds");- priv->save_timeout_id = g_timeout_add_seconds (15, - (GSourceFunc)save_timeout_cb,- ipod_db);+ RbIpodDbPrivate *priv = IPOD_DB_GET_PRIVATE (ipod_db);+ itdb_start_sync (priv->itdb);+ rb_debug ("Scheduling iPod database save in 3 seconds"); } else {- rb_debug ("Database save already scheduled");+ g_source_remove (priv->save_timeout_id);+ rb_debug ("Database save already scheduled, pushing back save in 3 seconds from now"); }+ priv->save_timeout_id = g_timeout_add_seconds (3, + (GSourceFunc)save_timeout_cb,+ ipod_db); } GList *diff --git a/plugins/mtpdevice/rb-mtp-source.c b/plugins/mtpdevice/rb-mtp-source.cindex bff85e9..cc8167d 100644--- a/plugins/mtpdevice/rb-mtp-source.c+++ b/plugins/mtpdevice/rb-mtp-source.c@@ -484,12 +484,14 @@ rb_mtp_source_dispose (GObject *object) #if defined(HAVE_GUDEV) if (priv->remount_volume != NULL) { rb_debug ("remounting gvfs volume for mtp device");+ /* the callback will unref remount_volume */ g_volume_mount (priv->remount_volume, G_MOUNT_MOUNT_NONE, NULL, NULL, remount_done_cb, NULL);+ priv->remount_volume = NULL; } #endif @@ -514,7 +516,11 @@ rb_mtp_source_finalize (GObject *object) g_hash_table_destroy (priv->artwork_request_map); g_hash_table_destroy (priv->track_transfer_map); /* probably need to destroy the tracks too.. */ -#if !defined(HAVE_GUDEV)+#if defined(HAVE_GUDEV)+ if (priv->udev_device) {+ g_object_unref (G_OBJECT (priv->udev_device));+ }+#else g_free (priv->udi); #endif g_free (priv->manufacturer);