1 |
loki_val 08/09/03 10:13:53 |
2 |
|
3 |
Added: banshee-1.2.1-libmtp-0.3.0-API.patch |
4 |
Log: |
5 |
Add patch for bug 233869. Kudos to Salah Coronya <salahx@×××××.com>, who produced this. |
6 |
(Portage version: 2.2_rc8/cvs/Linux 2.6.25.8 i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-sound/banshee/files/banshee-1.2.1-libmtp-0.3.0-API.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/banshee/files/banshee-1.2.1-libmtp-0.3.0-API.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/banshee/files/banshee-1.2.1-libmtp-0.3.0-API.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: banshee-1.2.1-libmtp-0.3.0-API.patch |
15 |
=================================================================== |
16 |
diff -u -r banshee-1-1.2.1.old/src/Libraries/Mtp/Mtp/Album.cs banshee-1-1.2.1/src/Libraries/Mtp/Mtp/Album.cs |
17 |
--- banshee-1-1.2.1.old/src/Libraries/Mtp/Mtp/Album.cs 2008-05-21 09:17:47.000000000 -0500 |
18 |
+++ banshee-1-1.2.1/src/Libraries/Mtp/Mtp/Album.cs 2008-09-03 00:57:00.000000000 -0500 |
19 |
@@ -131,7 +131,7 @@ |
20 |
if (saved) { |
21 |
saved = LIBMTP_Update_Album (device.Handle, ref album) == 0; |
22 |
} else { |
23 |
- saved = LIBMTP_Create_New_Album (device.Handle, ref album, 0) == 0; |
24 |
+ saved = LIBMTP_Create_New_Album (device.Handle, ref album) == 0; |
25 |
} |
26 |
|
27 |
if (album.tracks != IntPtr.Zero) { |
28 |
@@ -190,7 +190,7 @@ |
29 |
|
30 |
public static Album GetById (MtpDevice device, uint id) |
31 |
{ |
32 |
- IntPtr ptr = Album.LIBMTP_Get_Album (device.Handle, id); |
33 |
+ IntPtr ptr = Album.LIBMTP_Get_Album (device.Handle); |
34 |
if (ptr == IntPtr.Zero) { |
35 |
return null; |
36 |
} else { |
37 |
@@ -208,10 +208,10 @@ |
38 |
internal static extern IntPtr LIBMTP_Get_Album_List (MtpDeviceHandle handle); // LIBMTP_album_t* |
39 |
|
40 |
[DllImport("libmtp.dll")] |
41 |
- internal static extern IntPtr LIBMTP_Get_Album (MtpDeviceHandle handle, uint albumId); // LIBMTP_album_t* |
42 |
+ internal static extern IntPtr LIBMTP_Get_Album (MtpDeviceHandle handle); // LIBMTP_album_t* |
43 |
|
44 |
[DllImport("libmtp.dll")] |
45 |
- internal static extern int LIBMTP_Create_New_Album (MtpDeviceHandle handle, ref AlbumStruct album, uint parentId); |
46 |
+ internal static extern int LIBMTP_Create_New_Album (MtpDeviceHandle handle, ref AlbumStruct album); |
47 |
|
48 |
[DllImport("libmtp.dll")] |
49 |
internal static extern int LIBMTP_Update_Album (MtpDeviceHandle handle, ref AlbumStruct album); |
50 |
@@ -221,6 +221,8 @@ |
51 |
internal struct AlbumStruct |
52 |
{ |
53 |
public uint album_id; |
54 |
+ public uint parent_id; |
55 |
+ public uint storage_id; |
56 |
|
57 |
[MarshalAs(UnmanagedType.LPStr)] |
58 |
public string name; |
59 |
diff -u -r banshee-1-1.2.1.old/src/Libraries/Mtp/Mtp/Folder.cs banshee-1-1.2.1/src/Libraries/Mtp/Mtp/Folder.cs |
60 |
--- banshee-1-1.2.1.old/src/Libraries/Mtp/Mtp/Folder.cs 2008-04-07 22:59:11.000000000 -0500 |
61 |
+++ banshee-1-1.2.1/src/Libraries/Mtp/Mtp/Folder.cs 2008-09-03 00:11:53.000000000 -0500 |
62 |
@@ -210,6 +210,7 @@ |
63 |
{ |
64 |
public uint folder_id; |
65 |
public uint parent_id; |
66 |
+ public uint storage_id; |
67 |
[MarshalAs(UnmanagedType.LPStr)] public string name; |
68 |
public IntPtr sibling; // LIBMTP_folder_t* |
69 |
public IntPtr child; // LIBMTP_folder_t* |
70 |
diff -u -r banshee-1-1.2.1.old/src/Libraries/Mtp/Mtp/Track.cs banshee-1-1.2.1/src/Libraries/Mtp/Mtp/Track.cs |
71 |
--- banshee-1-1.2.1.old/src/Libraries/Mtp/Mtp/Track.cs 2008-04-23 14:20:58.000000000 -0500 |
72 |
+++ banshee-1-1.2.1/src/Libraries/Mtp/Mtp/Track.cs 2008-09-03 00:14:10.000000000 -0500 |
73 |
@@ -195,7 +195,7 @@ |
74 |
|
75 |
internal static void SendTrack (MtpDeviceHandle handle, string path, ref TrackStruct metadata, ProgressFunction callback, IntPtr data, uint parent) |
76 |
{ |
77 |
- if (LIBMTP_Send_Track_From_File (handle, path, ref metadata, callback, data, parent) != 0) |
78 |
+ if (LIBMTP_Send_Track_From_File (handle, path, ref metadata, callback, data) != 0) |
79 |
{ |
80 |
LibMtpException.CheckErrorStack (handle); |
81 |
throw new LibMtpException (ErrorCode.General, "Could not upload the track"); |
82 |
@@ -227,7 +227,7 @@ |
83 |
private static extern int LIBMTP_Get_Track_To_File (MtpDeviceHandle handle, uint trackId, string path, ProgressFunction callback, IntPtr data); |
84 |
|
85 |
[DllImport("libmtp.dll")] |
86 |
- private static extern int LIBMTP_Send_Track_From_File (MtpDeviceHandle handle, string path, ref TrackStruct track, ProgressFunction callback, IntPtr data, uint parentHandle); |
87 |
+ private static extern int LIBMTP_Send_Track_From_File (MtpDeviceHandle handle, string path, ref TrackStruct track, ProgressFunction callback, IntPtr data); |
88 |
|
89 |
[DllImport("libmtp.dll")] |
90 |
private static extern int LIBMTP_Update_Track_Metadata (MtpDeviceHandle handle, ref TrackStruct metadata); |
91 |
@@ -244,7 +244,8 @@ |
92 |
{ |
93 |
public uint item_id; |
94 |
public uint parent_id; |
95 |
- |
96 |
+ public uint storage_id; |
97 |
+ |
98 |
[MarshalAs(UnmanagedType.LPStr)] public string title; |
99 |
[MarshalAs(UnmanagedType.LPStr)] public string artist; |
100 |
[MarshalAs(UnmanagedType.LPStr)] public string genre; |