View | Details | Raw Unified
Collapse All | Expand All

(-) banshee-1-1.2.1.old/src/Libraries/Mtp/Mtp/Album.cs (-4 / +4 lines)
 Lines 131-137    Link Here 
            if (saved) {
            if (saved) {
                saved = LIBMTP_Update_Album (device.Handle, ref album) == 0;
                saved = LIBMTP_Update_Album (device.Handle, ref album) == 0;
            } else {
            } else {
                saved = LIBMTP_Create_New_Album (device.Handle, ref album, 0) == 0;
                saved = LIBMTP_Create_New_Album (device.Handle, ref album) == 0;
            }
            }
            if (album.tracks != IntPtr.Zero) {
            if (album.tracks != IntPtr.Zero) {
 Lines 190-196    Link Here 
        public static Album GetById (MtpDevice device, uint id)
        public static Album GetById (MtpDevice device, uint id)
        {
        {
            IntPtr ptr = Album.LIBMTP_Get_Album (device.Handle, id);
            IntPtr ptr = Album.LIBMTP_Get_Album (device.Handle);
            if (ptr == IntPtr.Zero) {
            if (ptr == IntPtr.Zero) {
                return null;
                return null;
            } else {
            } else {
 Lines 208-217    Link Here 
		internal static extern IntPtr LIBMTP_Get_Album_List (MtpDeviceHandle handle); // LIBMTP_album_t*
		internal static extern IntPtr LIBMTP_Get_Album_List (MtpDeviceHandle handle); // LIBMTP_album_t*
		[DllImport("libmtp.dll")]
		[DllImport("libmtp.dll")]
		internal static extern IntPtr LIBMTP_Get_Album (MtpDeviceHandle handle, uint albumId); // LIBMTP_album_t*
		internal static extern IntPtr LIBMTP_Get_Album (MtpDeviceHandle handle); // LIBMTP_album_t*
		[DllImport("libmtp.dll")]
		[DllImport("libmtp.dll")]
		internal static extern int LIBMTP_Create_New_Album (MtpDeviceHandle handle, ref AlbumStruct album, uint parentId);
		internal static extern int LIBMTP_Create_New_Album (MtpDeviceHandle handle, ref AlbumStruct album);
		[DllImport("libmtp.dll")]
		[DllImport("libmtp.dll")]
		internal static extern int LIBMTP_Update_Album (MtpDeviceHandle handle, ref AlbumStruct album);
		internal static extern int LIBMTP_Update_Album (MtpDeviceHandle handle, ref AlbumStruct album);
(-) banshee-1-1.2.1.old/src/Libraries/Mtp/Mtp/Track.cs (-2 / +2 lines)
 Lines 195-201    Link Here 
		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, uint parent)
		{
		{
			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) != 0)
			{
			{
				LibMtpException.CheckErrorStack (handle);
				LibMtpException.CheckErrorStack (handle);
				throw new LibMtpException (ErrorCode.General, "Could not upload the track");
				throw new LibMtpException (ErrorCode.General, "Could not upload the track");
 Lines 227-233    Link Here 
		private static extern int LIBMTP_Get_Track_To_File (MtpDeviceHandle handle, uint trackId, string path, ProgressFunction callback, IntPtr data);
		private static extern int LIBMTP_Get_Track_To_File (MtpDeviceHandle handle, uint trackId, string path, ProgressFunction callback, IntPtr data);
		[DllImport("libmtp.dll")]
		[DllImport("libmtp.dll")]
		private static extern int LIBMTP_Send_Track_From_File (MtpDeviceHandle handle, string path, ref TrackStruct track, ProgressFunction callback, IntPtr data, uint parentHandle);
		private static extern int LIBMTP_Send_Track_From_File (MtpDeviceHandle handle, string path, ref TrackStruct track, ProgressFunction callback, IntPtr data);
		[DllImport("libmtp.dll")]
		[DllImport("libmtp.dll")]
	    private static extern int LIBMTP_Update_Track_Metadata (MtpDeviceHandle handle, ref TrackStruct metadata);
	    private static extern int LIBMTP_Update_Track_Metadata (MtpDeviceHandle handle, ref TrackStruct metadata);