[rhythmbox] rhythmdb: only replace ignore or error entries when importing (bug #590474)
- From: Jonathan Matthew <jmatthew src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rhythmbox] rhythmdb: only replace ignore or error entries when importing (bug #590474)
- Date: Thu, 19 Nov 2009 13:00:34 +0000 (UTC)
commit b6742b69ec40ac5d7d48d42a5d1512ade4142ce0
Author: Jonathan Matthew <jonathan d14n org>
Date: Thu Nov 19 22:55:42 2009 +1000
rhythmdb: only replace ignore or error entries when importing (bug #590474)
When library monitoring is enabled, and the podcast download directory
is within the library directory, podcast episodes were being deleted and
then imported into the library as normal files. To fix this, we'll only
replace existing ignore or error entries for the newly imported URI.
rhythmdb/rhythmdb.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/rhythmdb/rhythmdb.c b/rhythmdb/rhythmdb.c
index faa2ea5..599b016 100644
--- a/rhythmdb/rhythmdb.c
+++ b/rhythmdb/rhythmdb.c
@@ -2340,8 +2340,10 @@ rhythmdb_process_metadata_load_real (RhythmDBEvent *event)
entry = rhythmdb_entry_lookup_by_location_refstring (event->db, event->real_uri);
if (entry != NULL) {
- if (rhythmdb_entry_get_entry_type (entry) != event->entry_type) {
- /* switching from IGNORE to SONG or vice versa, recreate the entry */
+ RhythmDBEntryType etype;
+ etype = rhythmdb_entry_get_entry_type (entry);
+ if (etype == event->error_type || etype == event->ignore_type) {
+ /* switching from IGNORE/ERROR to SONG, recreate the entry */
rhythmdb_entry_delete (event->db, entry);
rhythmdb_add_timeout_commit (event->db, FALSE);
entry = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]