rhythmbox r6143 - in trunk: . plugins/generic-player



Author: jmatthew
Date: Thu Feb  5 12:19:44 2009
New Revision: 6143
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6143&view=rev

Log:
2009-02-05  Jonathan Matthew  <jonathan d14n org>

	* plugins/generic-player/rb-generic-player-source.c:
	(get_device_info):  The playlist_path hal attribute is sometimes a
	string and sometimes a strlist, so try both.  From #570484.


Modified:
   trunk/ChangeLog
   trunk/plugins/generic-player/rb-generic-player-source.c

Modified: trunk/plugins/generic-player/rb-generic-player-source.c
==============================================================================
--- trunk/plugins/generic-player/rb-generic-player-source.c	(original)
+++ trunk/plugins/generic-player/rb-generic-player-source.c	Thu Feb  5 12:19:44 2009
@@ -480,14 +480,25 @@
 			}
 			free_dbus_error ("getting playlist format", &error);
 
-			/* get playlist path */
+			/* get playlist path - in current hal-info packages, this is sometimes a string
+			 * and sometimes a strlist, so try both. 
+			 * http://bugs.freedesktop.org/show_bug.cgi?id=19961
+			 */
+			dbus_error_init (&error);
+			proplist = libhal_device_get_property_strlist (ctx, udi, "portable_audio_player.playlist_path", &error);
+			if (proplist && !dbus_error_is_set (&error)) {
+				set_playlist_path (source, proplist[0]);
+				libhal_free_string_array (proplist);
+			}
+			free_dbus_error ("getting playlist path (strlist)", &error);
+			
 			dbus_error_init (&error);
 			prop = libhal_device_get_property_string (ctx, udi, "portable_audio_player.playlist_path", &error);
 			if (prop && !dbus_error_is_set (&error)) {
 				set_playlist_path (source, prop);
 				libhal_free_string (prop);
 			}
-			free_dbus_error ("getting playlist path", &error);
+			free_dbus_error ("getting playlist path (string)", &error);
 
 			/* get max folder depth */
 			dbus_error_init (&error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]