banshee r5026 - in trunk/banshee: . src/Libraries/Mtp/Mtp



Author: gburt
Date: Tue Feb 10 21:53:57 2009
New Revision: 5026
URL: http://svn.gnome.org/viewvc/banshee?rev=5026&view=rev

Log:
2009-02-10  Gabriel Burt  <gabriel burt gmail com>

	* src/Libraries/Mtp/Mtp/MtpDevice.cs:
	* src/Libraries/Mtp/Mtp/Track.cs: Modified patch from William Pettersson
	fixing NRE with transferring song to MTP devices (BGO #571023)



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Libraries/Mtp/Mtp/MtpDevice.cs
   trunk/banshee/src/Libraries/Mtp/Mtp/Track.cs

Modified: trunk/banshee/src/Libraries/Mtp/Mtp/MtpDevice.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mtp/Mtp/MtpDevice.cs	(original)
+++ trunk/banshee/src/Libraries/Mtp/Mtp/MtpDevice.cs	Tue Feb 10 21:53:57 2009
@@ -248,7 +248,7 @@
             }
 			
 			// We send the trackstruct by ref so that when the file_id gets filled in, our copy is updated
-			Track.SendTrack (Handle, path, ref track.trackStruct, callback, IntPtr.Zero, folder.FolderId);
+			Track.SendTrack (Handle, path, ref track.trackStruct, callback, IntPtr.Zero);
 			// LibMtp.GetStorage (Handle, 0);
 		}
 

Modified: trunk/banshee/src/Libraries/Mtp/Mtp/Track.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mtp/Mtp/Track.cs	(original)
+++ trunk/banshee/src/Libraries/Mtp/Mtp/Track.cs	Tue Feb 10 21:53:57 2009
@@ -214,13 +214,12 @@
 			return LIBMTP_Get_Tracklisting_With_Callback (handle, function, data);
 		}
 
-		internal static void SendTrack (MtpDeviceHandle handle, string path, ref TrackStruct metadata, ProgressFunction callback, IntPtr data, uint parent)
+		internal static void SendTrack (MtpDeviceHandle handle, string path, ref TrackStruct metadata, ProgressFunction callback, IntPtr data)
 		{
 #if LIBMTP8
-            metadata.parent_id = parent;
 			if (LIBMTP_Send_Track_From_File (handle, path, ref metadata, callback, data) != 0)
 #else
-			if (LIBMTP_Send_Track_From_File (handle, path, ref metadata, callback, data, parent) != 0)
+			if (LIBMTP_Send_Track_From_File (handle, path, ref metadata, callback, data, metadata.parent_id) != 0)
 #endif
 			{
 				LibMtpException.CheckErrorStack (handle);



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