[rhythmbox] rhythmdb: re-enable podcast upgrade code, fix tests
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] rhythmdb: re-enable podcast upgrade code, fix tests
- Date: Mon, 30 Aug 2010 09:59:14 +0000 (UTC)
commit 34c78880020c67ae09b00d79a8d2b8ddef6c0343
Author: Jonathan Matthew <jonathan d14n org>
Date: Mon Aug 30 19:58:56 2010 +1000
rhythmdb: re-enable podcast upgrade code, fix tests
rhythmdb/rhythmdb-tree.c | 4 ----
tests/test-utils.c | 6 +++++-
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/rhythmdb/rhythmdb-tree.c b/rhythmdb/rhythmdb-tree.c
index fb1ad99..b42808c 100644
--- a/rhythmdb/rhythmdb-tree.c
+++ b/rhythmdb/rhythmdb-tree.c
@@ -517,7 +517,6 @@ rhythmdb_tree_parser_end_element (struct RhythmDBTreeLoadContext *ctx,
rb_debug ("pre-Date entry found, causing re-read");
ctx->entry->mtime = 0;
}
-#if 0
if (ctx->entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_FEED) {
RhythmDBPodcastFields *podcast = RHYTHMDB_ENTRY_GET_TYPE_DATA (ctx->entry, RhythmDBPodcastFields);
/* Handle upgrades from 0.9.2.
@@ -542,7 +541,6 @@ rhythmdb_tree_parser_end_element (struct RhythmDBTreeLoadContext *ctx,
ctx->entry->mountpoint = tmp;
}
}
-#endif
if (ctx->entry->type == RHYTHMDB_ENTRY_TYPE_SONG) {
/* Since we now care about mountpoints for all local entries, not just
* those on things that actually get mounted and unmounted, we need to
@@ -578,7 +576,6 @@ rhythmdb_tree_parser_end_element (struct RhythmDBTreeLoadContext *ctx,
rhythmdb_commit (RHYTHMDB (ctx->db));
ctx->batch_count = 0;
}
-#if 0
} else if (ctx->entry->type == RHYTHMDB_ENTRY_TYPE_PODCAST_POST &&
entry->type == RHYTHMDB_ENTRY_TYPE_SONG) {
rb_debug ("found song entry with duplicate location for Podcast post %s. merging metadata",
@@ -602,7 +599,6 @@ rhythmdb_tree_parser_end_element (struct RhythmDBTreeLoadContext *ctx,
rhythmdb_commit (RHYTHMDB (ctx->db));
ctx->batch_count = 0;
}
-#endif
} else {
rb_debug ("found entry with duplicate location %s. merging metadata",
rb_refstring_get (ctx->entry->location));
diff --git a/tests/test-utils.c b/tests/test-utils.c
index a8b648f..a0a8366 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -141,10 +141,14 @@ test_rhythmdb_setup (void)
fail_unless (db != NULL, "failed to initialise DB");
rhythmdb_start_action_thread (db);
- /* allow SONGs to be synced to for the tests */
+ /* allow songs and ignored entries to be synced to for the tests */
entry_type = RHYTHMDB_ENTRY_TYPE_SONG;
entry_type->can_sync_metadata = (RhythmDBEntryTypeBooleanFunc)rb_true_function;
entry_type->sync_metadata = (RhythmDBEntryTypeSyncFunc)rb_null_function;
+
+ entry_type = RHYTHMDB_ENTRY_TYPE_IGNORE;
+ entry_type->can_sync_metadata = (RhythmDBEntryTypeBooleanFunc)rb_true_function;
+ entry_type->sync_metadata = (RhythmDBEntryTypeSyncFunc)rb_null_function;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]