openbsd-ports/audio/gnomad2/patches/patch-src_jukebox_c
2010-12-21 18:16:30 +00:00

39 lines
1.6 KiB
Plaintext

$OpenBSD: patch-src_jukebox_c,v 1.1 2010/12/21 18:16:30 jasper Exp $
Make compatible with newer libmtp API's.
--- src/jukebox.c.orig Tue Aug 14 22:28:26 2007
+++ src/jukebox.c Fri Dec 3 20:17:23 2010
@@ -2028,8 +2028,9 @@ gpointer hd2jb_thread(gpointer thread_args)
// TODO: Discarding return value as for now
// g_print("Transferring MTP track...\n");
// Hardcode parent (folder) to 0 (== root directory)
+ trackmeta->parent_id = 0;
ret = LIBMTP_Send_Track_From_File(mtpdevice, tmpfname, trackmeta,
- mtp_progress, NULL, 0);
+ mtp_progress, NULL);
if (ret != 0) {
g_print("Error sending file \"%s\" to MTP device!\n", tmpfname);
goto hd2jb_cleanup;
@@ -2190,8 +2191,9 @@ gpointer hd2jb_data_thread(gpointer thread_args)
filemeta->filename = g_strdup(hdmeta->filename);
filemeta->filesize = (uint64_t) hdmeta->size;
filemeta->filetype = filetype_d->filetype;
+ filemeta->parent_id = 0;
- if (LIBMTP_Send_File_From_File(mtpdevice, tmpfname, filemeta, mtp_progress, NULL, 0) != 0) {
+ if (LIBMTP_Send_File_From_File(mtpdevice, tmpfname, filemeta, mtp_progress, NULL) != 0) {
LIBMTP_destroy_file_t(filemeta);
g_free(tmpfname);
goto hd2jb_data_cleanup;
@@ -2584,7 +2586,8 @@ guint32 jukebox_create_playlist(gchar *plname, GtkTree
pl = LIBMTP_new_playlist_t();
pl->name = g_strdup(plname);
// This will create the new playlist in the default folder
- if (LIBMTP_Create_New_Playlist(mtpdevice, pl, 0) != 0) {
+ pl->parent_id = 0;
+ if (LIBMTP_Create_New_Playlist(mtpdevice, pl) != 0) {
create_error_dialog(_("Could not create playlist"));
return 0;
}