[rhythmbox] removable-media: include track number in duplicate check (bug #609908)
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] removable-media: include track number in duplicate check (bug #609908)
- Date: Wed, 17 Feb 2010 13:06:44 +0000 (UTC)
commit 456d79808934e8d51792af56b8f9bd83ffe0703c
Author: Martin Schaaf <mascha ma-scha de>
Date: Wed Feb 17 23:05:29 2010 +1000
removable-media: include track number in duplicate check (bug #609908)
sources/rb-removable-media-source.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/sources/rb-removable-media-source.c b/sources/rb-removable-media-source.c
index 0178ff8..b67477b 100644
--- a/sources/rb-removable-media-source.c
+++ b/sources/rb-removable-media-source.c
@@ -662,6 +662,7 @@ rb_removable_media_source_should_paste_no_duplicate (RBRemovableMediaSource *sou
const char *title;
const char *album;
const char *artist;
+ gulong track_number;
GtkTreeModel *query_model;
GtkTreeIter iter;
gboolean no_match;
@@ -679,6 +680,7 @@ rb_removable_media_source_should_paste_no_duplicate (RBRemovableMediaSource *sou
title = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_TITLE);
album = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ALBUM);
artist = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ARTIST);
+ track_number = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_TRACK_NUMBER);
rhythmdb_do_full_query (db, RHYTHMDB_QUERY_RESULTS (query_model),
RHYTHMDB_QUERY_PROP_EQUALS,
RHYTHMDB_PROP_TYPE, entry_type,
@@ -688,6 +690,8 @@ rb_removable_media_source_should_paste_no_duplicate (RBRemovableMediaSource *sou
RHYTHMDB_PROP_ALBUM, album,
RHYTHMDB_QUERY_PROP_EQUALS,
RHYTHMDB_PROP_TITLE, title,
+ RHYTHMDB_QUERY_PROP_EQUALS,
+ RHYTHMDB_PROP_TRACK_NUMBER, track_number,
RHYTHMDB_QUERY_END);
no_match = (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (query_model),
@@ -696,7 +700,7 @@ rb_removable_media_source_should_paste_no_duplicate (RBRemovableMediaSource *sou
g_object_unref(query_model);
g_object_unref (db);
if (no_match == FALSE) {
- rb_debug ("not adding %s - %s - %s to removable device since it's already present\n", title, album, artist);
+ rb_debug ("not adding %lu - %s - %s - %s to removable device since it's already present", track_number, title, album, artist);
}
return no_match;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]