[rhythmbox] grilo: use track number if present
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] grilo: use track number if present
- Date: Tue, 13 Sep 2011 11:22:38 +0000 (UTC)
commit 8c9423decc0e017f36f2dfdcb722acc51367be92
Author: Jonathan Matthew <jonathan d14n org>
Date: Mon Sep 12 21:56:49 2011 +1000
grilo: use track number if present
plugins/grilo/rb-grilo-source.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/plugins/grilo/rb-grilo-source.c b/plugins/grilo/rb-grilo-source.c
index 88e22c4..63e3be9 100644
--- a/plugins/grilo/rb-grilo-source.c
+++ b/plugins/grilo/rb-grilo-source.c
@@ -586,8 +586,15 @@ create_entry_for_media (RhythmDB *db, RhythmDBEntryType *entry_type, GrlData *da
}
}
- /* rating and play count? */
+ if (grl_data_has_key (data, GRL_METADATA_KEY_TRACK_NUMBER)) {
+ GValue v = {0,};
+ g_value_init (&v, G_TYPE_ULONG);
+ g_value_set_ulong (&v, grl_data_get_int (data, GRL_METADATA_KEY_TRACK_NUMBER));
+ rhythmdb_entry_set (db, entry, RHYTHMDB_PROP_TRACK_NUMBER, &v);
+ g_value_unset (&v);
+ }
+ /* rating and play count? */
entry_data = RHYTHMDB_ENTRY_GET_TYPE_DATA (entry, RBGriloEntryData);
entry_data->grilo_data = g_object_ref (data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]