rhythmbox r5844 - in trunk: . plugins/mtpdevice



Author: jmatthew
Date: Sat Aug  9 02:19:14 2008
New Revision: 5844
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5844&view=rev

Log:
2008-08-09  Jonathan Matthew  <jonathan d14n org>

	patch partly by:  Linus Walleij  <triad df lth se>

	* configure.ac:
	* plugins/mtpdevice/rb-mtp-source.c:
	Add compatibility with libmtp version 0.3.0; bug #546962.


Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/plugins/mtpdevice/rb-mtp-source.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sat Aug  9 02:19:14 2008
@@ -154,6 +154,11 @@
 	  fi
           if test "x$enable_hal" = xyes; then
 	     use_mtp=yes
+	     dnl Check for libmtp 0.3.0+
+	     PKG_CHECK_EXISTS(libmtp >= 0.3.0, found_libmtp_030_pkg=yes, found_libmtp_030_pkg=no)
+	     if test x"$found_libmtp_030_pkg" = "xyes" ; then
+	       AC_DEFINE([HAVE_LIBMTP_030], 1, [indicates whether libmtp 0.3.0 is installed])
+	     fi
           fi
 	  AC_SUBST(MTP_CFLAGS)
 	  AC_SUBST(MTP_LIBS)

Modified: trunk/plugins/mtpdevice/rb-mtp-source.c
==============================================================================
--- trunk/plugins/mtpdevice/rb-mtp-source.c	(original)
+++ trunk/plugins/mtpdevice/rb-mtp-source.c	Sat Aug  9 02:19:14 2008
@@ -670,7 +670,11 @@
 		trackmeta->filetype = mimetype_to_filetype (mimetype);
 	}
 
+#ifdef HAVE_LIBMTP_030
+	if (LIBMTP_Send_Track_From_File (device, filename, trackmeta, NULL, NULL) != 0) {
+#else
 	if (LIBMTP_Send_Track_From_File (device, filename, trackmeta, NULL, NULL, 0) != 0) {
+#endif
 		LIBMTP_destroy_track_t (trackmeta);
 		rb_debug ("Tracktransfer failed\n");
 		return NULL;



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