[rhythmbox] Accept afc mounts as iPods
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rhythmbox] Accept afc mounts as iPods
- Date: Fri, 31 Jul 2009 17:46:26 +0000 (UTC)
commit ab0ba6d43b73d7030d3a2ea4c5c529919ea253c7
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jul 31 18:44:51 2009 +0100
Accept afc mounts as iPods
We don't need to check the volume's data, we know that the
afc mounts will be iPod Touches/iPhones.
plugins/ipod/rb-ipod-helpers.c | 10 ++++++++++
plugins/ipod/rb-ipod-source.c | 2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plugins/ipod/rb-ipod-helpers.c b/plugins/ipod/rb-ipod-helpers.c
index a4e0c2c..382edc2 100644
--- a/plugins/ipod/rb-ipod-helpers.c
+++ b/plugins/ipod/rb-ipod-helpers.c
@@ -489,6 +489,16 @@ rb_ipod_helpers_is_ipod (GMount *mount)
{
gboolean result;
GVolume *volume;
+ GFile *root;
+
+ root = g_mount_get_root (mount);
+ if (root != NULL) {
+ if (g_file_has_uri_scheme (root, "afc") != FALSE) {
+ g_object_unref (root);
+ return TRUE;
+ }
+ g_object_unref (root);
+ }
volume = g_mount_get_volume (mount);
if (volume == NULL)
diff --git a/plugins/ipod/rb-ipod-source.c b/plugins/ipod/rb-ipod-source.c
index 3736948..8afe1a4 100644
--- a/plugins/ipod/rb-ipod-source.c
+++ b/plugins/ipod/rb-ipod-source.c
@@ -270,6 +270,8 @@ rb_ipod_source_new (RBPlugin *plugin,
volume = g_mount_get_volume (mount);
path = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+ if (path == NULL)
+ path = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UUID);
g_object_unref (volume);
g_object_get (shell, "db", &db, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]