diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2008-12-26 15:35:51 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2008-12-26 15:35:51 +0000 |
commit | fa22046509f2a8ac2b98b05ad04e7e32c014b730 (patch) | |
tree | 37e666176379473a48bb5e35bf9ee225c33d5557 /audio/rhythmbox/patches | |
parent | 28902be8160afc2278852e69ef3bc5b71fc6230c (diff) | |
download | pkgsrc-fa22046509f2a8ac2b98b05ad04e7e32c014b730.tar.gz |
Add HAL and ipod support; tested with an iPod Shuffle and a PSP-2000.
Diffstat (limited to 'audio/rhythmbox/patches')
-rw-r--r-- | audio/rhythmbox/patches/patch-ae | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/audio/rhythmbox/patches/patch-ae b/audio/rhythmbox/patches/patch-ae new file mode 100644 index 00000000000..d4e8d774ac1 --- /dev/null +++ b/audio/rhythmbox/patches/patch-ae @@ -0,0 +1,57 @@ +$NetBSD: patch-ae,v 1.5 2008/12/26 15:35:51 jmcneill Exp $ + +From http://svn.gnome.org/viewvc/rhythmbox?view=revision&revision=5992 + +--- plugins/generic-player/rb-generic-player-source.c 2008/10/01 19:28:24 5961 ++++ plugins/generic-player/rb-generic-player-source.c 2008/10/23 11:50:40 5992 +@@ -824,21 +824,43 @@ + char *udi = get_hal_udi_for_player (ctx, mount); + if (udi != NULL) { + DBusError error; ++ char **proplist; + char *prop; + + rb_debug ("Checking udi %s", udi); + /* check that it can be accessed as mass-storage */ + dbus_error_init (&error); +- prop = libhal_device_get_property_string (ctx, udi, "portable_audio_player.access_method", &error); +- if (prop != NULL && strcmp (prop, "storage") == 0 && !dbus_error_is_set (&error)) { +- /* the device has passed all tests, so it should be a usable player */ +- result = TRUE; +- } else { ++ proplist = libhal_device_get_property_strlist (ctx, udi, "portable_audio_player.access_method.protocols", &error); ++ if (proplist != NULL && !dbus_error_is_set (&error)) { ++ int i; ++ for (i = 0; proplist[i] != NULL; i++) { ++ rb_debug ("device access method: %s", proplist[i]); ++ if (strcmp (proplist[i], "storage") == 0) { ++ result = TRUE; ++ break; ++ } ++ } ++ ++ libhal_free_string_array (proplist); ++ } ++ free_dbus_error ("checking device access method", &error); ++ ++ if (result == FALSE) { ++ dbus_error_init (&error); ++ prop = libhal_device_get_property_string (ctx, udi, "portable_audio_player.access_method", &error); ++ if (prop != NULL && strcmp (prop, "storage") == 0 && !dbus_error_is_set (&error)) { ++ /* the device has passed all tests, so it should be a usable player */ ++ result = TRUE; ++ } ++ ++ libhal_free_string (prop); ++ free_dbus_error ("checking device access method", &error); ++ } ++ ++ if (result == FALSE) { + rb_debug ("device cannot be accessed via storage"); + } +- libhal_free_string (prop); + +- free_dbus_error ("checking device access method", &error); + } else { + rb_debug ("device is not an audio player"); + } |