diff src/mtp_up/mtp.c @ 2935:6f0eccec978e

applied a patch made by Linus Walleij that fixes the MTP plugin on libmtp >0.3, thanks!
author Cristi Magherusan <majeru@atheme.org>
date Sat, 06 Sep 2008 01:58:02 +0300
parents bd3a24b39058
children 3134a0987162
line wrap: on
line diff
--- a/src/mtp_up/mtp.c	Sat Aug 30 18:36:12 2008 +0200
+++ b/src/mtp_up/mtp.c	Sat Sep 06 01:58:02 2008 +0300
@@ -192,12 +192,17 @@
 
     g_free(from_path);
     g_free(tmp);
-    parent_id = mtp_device->default_music_folder;
 
 #if DEBUG
     g_print("Uploading track '%s'\n",filename);
 #endif
+#ifdef HAVE_LIBMTP_030
+    gentrack->parent_id = mtp_device->default_music_folder;
+    ret = LIBMTP_Send_Track_From_File(mtp_device, filename , gentrack, NULL , NULL);
+#else
+    parent_id = mtp_device->default_music_folder;
     ret = LIBMTP_Send_Track_From_File(mtp_device, filename , gentrack, NULL , NULL, parent_id);
+#endif
     LIBMTP_destroy_track_t(gentrack);
     if (ret == 0) 
         g_print("Track upload finished!\n");