[rhythmbox] rhythmdb: don't monitor files outside library locations
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] rhythmdb: don't monitor files outside library locations
- Date: Tue, 18 Sep 2012 23:00:08 +0000 (UTC)
commit 7fd3e2ddd847d755be249233f9592c733821479c
Author: Jonathan Matthew <jonathan d14n org>
Date: Wed Sep 19 08:58:21 2012 +1000
rhythmdb: don't monitor files outside library locations
Trying to do this involves annoying threads and crashes, and
it's not worth the effort.
https://bugzilla.gnome.org/show_bug.cgi?id=684304
rhythmdb/rhythmdb-monitor.c | 28 ----------------------------
1 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/rhythmdb/rhythmdb-monitor.c b/rhythmdb/rhythmdb-monitor.c
index 7eed0a8..9c5caf9 100644
--- a/rhythmdb/rhythmdb-monitor.c
+++ b/rhythmdb/rhythmdb-monitor.c
@@ -144,24 +144,6 @@ actually_add_monitor (RhythmDB *db, GFile *directory, GError **error)
g_mutex_unlock (&db->priv->monitor_mutex);
}
-static void
-monitor_entry_file (RhythmDBEntry *entry, RhythmDB *db)
-{
- if (entry->type == RHYTHMDB_ENTRY_TYPE_SONG) {
- const char *loc;
- int i;
-
- loc = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_LOCATION);
-
- /* don't add add monitor if it's in the library path */
- for (i = 0; db->priv->library_locations[i] != NULL; i++) {
- if (g_str_has_prefix (loc, db->priv->library_locations[i]))
- return;
- }
- rhythmdb_monitor_uri_path (db, loc, NULL);
- }
-}
-
static gboolean
monitor_subdirectory (GFile *file, gboolean dir, RhythmDB *db)
{
@@ -237,19 +219,9 @@ rhythmdb_process_changed_files (RhythmDB *db)
return TRUE;
}
-static gpointer
-_monitor_entry_thread (RhythmDB *db)
-{
- rhythmdb_entry_foreach (db, (GFunc) monitor_entry_file, db);
- g_object_unref (G_OBJECT (db));
- return NULL;
-}
-
void
rhythmdb_start_monitoring (RhythmDB *db)
{
- g_thread_new ("monitor-entry", (GThreadFunc)_monitor_entry_thread, g_object_ref (db));
-
/* monitor all library locations */
if (db->priv->library_locations) {
int i;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]