1 |
loki_val 08/09/03 12:28:17 |
2 |
|
3 |
Added: 1.5.1-libmtp-0.3.0-API.patch |
4 |
Log: |
5 |
Add libmtp-0.3.0 API support, patch from upstream bugzilla rebased. Fix configure being invoked with wrong options (flac->flacng, cdaudio-ng->cdaudio). |
6 |
(Portage version: 2.2_rc8/cvs/Linux 2.6.25.8 i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-plugins/audacious-plugins/files/1.5.1-libmtp-0.3.0-API.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/audacious-plugins/files/1.5.1-libmtp-0.3.0-API.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/audacious-plugins/files/1.5.1-libmtp-0.3.0-API.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: 1.5.1-libmtp-0.3.0-API.patch |
15 |
=================================================================== |
16 |
diff -NrU5 audacious-plugins-1.5.1.orig/configure.ac audacious-plugins-1.5.1/configure.ac |
17 |
--- audacious-plugins-1.5.1.orig/configure.ac 2008-09-03 12:59:59.000000000 +0200 |
18 |
+++ audacious-plugins-1.5.1/configure.ac 2008-09-03 13:02:47.000000000 +0200 |
19 |
@@ -1363,10 +1363,15 @@ |
20 |
if test "x$have_mtp_up" = "xyes"; then |
21 |
have_mtp_up=yes |
22 |
PKG_CHECK_MODULES(MTP, [libmtp >= 0.1.3], [GENERAL_PLUGINS="$GENERAL_PLUGINS mtp_up" ], [have_mtp_up="no"]) |
23 |
MTP_LIBS=`pkg-config --libs libmtp` |
24 |
MTP_CFLAGS=`pkg-config --cflags libmtp` |
25 |
+ dnl Check for libmtp 0.3.0+ |
26 |
+ PKG_CHECK_EXISTS( [libmtp >= 0.3.0], [libmtp_030_pkg=yes], [libmtp_030_pkg=no]) |
27 |
+ if test x"$libmtp_030_pkg" = "xyes" ; then |
28 |
+ AC_DEFINE([HAVE_LIBMTP_030], 1, [indicates if at least libmtp 0.3.0 is installed]) |
29 |
+ fi |
30 |
else |
31 |
have_mtp_up=no |
32 |
AC_MSG_RESULT([*** mtp upload plugin disabled by request ***]) |
33 |
fi |
34 |
AC_SUBST(MTP_LIBS) |
35 |
diff -NrU5 audacious-plugins-1.5.1.orig/src/mtp_up/mtp.c audacious-plugins-1.5.1/src/mtp_up/mtp.c |
36 |
--- audacious-plugins-1.5.1.orig/src/mtp_up/mtp.c 2008-09-03 12:59:59.000000000 +0200 |
37 |
+++ audacious-plugins-1.5.1/src/mtp_up/mtp.c 2008-09-03 13:05:55.000000000 +0200 |
38 |
@@ -190,16 +190,21 @@ |
39 |
tmp = g_strescape(from_path,NULL); |
40 |
filename=g_filename_from_uri(tmp,NULL,NULL); |
41 |
|
42 |
g_free(from_path); |
43 |
g_free(tmp); |
44 |
- parent_id = mtp_device->default_music_folder; |
45 |
|
46 |
#if DEBUG |
47 |
g_print("Uploading track '%s'\n",filename); |
48 |
#endif |
49 |
+#ifdef HAVE_LIBMTP_030 |
50 |
+ gentrack->parent_id = mtp_device->default_music_folder; |
51 |
+ ret = LIBMTP_Send_Track_From_File(mtp_device, filename , gentrack, NULL , NULL); |
52 |
+#else |
53 |
+ parent_id = mtp_device->default_music_folder; |
54 |
ret = LIBMTP_Send_Track_From_File(mtp_device, filename , gentrack, NULL , NULL, parent_id); |
55 |
+#endif |
56 |
LIBMTP_destroy_track_t(gentrack); |
57 |
if (ret == 0) |
58 |
g_print("Track upload finished!\n"); |
59 |
else |
60 |
{ |