banshee r3094 - in branches/banshee/stable: . src/Dap/Banshee.Dap.Mtp



Author: gburt
Date: Wed Jan 30 02:59:44 2008
New Revision: 3094
URL: http://svn.gnome.org/viewvc/banshee?rev=3094&view=rev

Log:
2008-01-29  Gabriel Burt  <gabriel burt gmail com>

	* src/Dap/Banshee.Dap.Mtp/MtpDap.cs: Support the new
	portable_audio_player.access_method.protocols way of specifying a player
	is MTP.


Modified:
   branches/banshee/stable/ChangeLog
   branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDap.cs

Modified: branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDap.cs
==============================================================================
--- branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDap.cs	(original)
+++ branches/banshee/stable/src/Dap/Banshee.Dap.Mtp/MtpDap.cs	Wed Jan 30 02:59:44 2008
@@ -84,8 +84,10 @@
 		{
             hal_device = halDevice;
 
-            // Make sure it's an MTP device
-            if (hal_device["portable_audio_player.type"] != "mtp") {
+            // Make sure it's an MTP device.  The second check (against 'type') is an HAL spec.
+            if (!((hal_device.PropertyExists ("portable_audio_player.access_method.protocols") &&
+                    Array.IndexOf (hal_device.GetPropertyStringList ("portable_audio_player.access_method.protocols"), "mtp") != -1) ||
+                    hal_device["portable_audio_player.type"] == "mtp")) {
 				return InitializeResult.Invalid;
             }
 



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