aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2008-12-31 02:16:56 +0800
committerpav <pav@FreeBSD.org>2008-12-31 02:16:56 +0800
commit5c8a6fab5bba81f2bd90be3952041194a1574f1f (patch)
tree897f02b5f739efc9164e4a636f5a73f94fce39ba /audio
parent13aeeb38c60676b49645c0f146cad43684337d29 (diff)
downloadfreebsd-ports-gnome-5c8a6fab5bba81f2bd90be3952041194a1574f1f.tar.gz
freebsd-ports-gnome-5c8a6fab5bba81f2bd90be3952041194a1574f1f.tar.zst
freebsd-ports-gnome-5c8a6fab5bba81f2bd90be3952041194a1574f1f.zip
- Fix build with new libmtp
Submitted by: Diego Depaoli <trebestie@gmail.com> to ports@ Obtained from: gentoo
Diffstat (limited to 'audio')
-rw-r--r--audio/amarok-kde4/files/patch-amarok_src_mediadevice_mtp_mtpmediadevice.cpp44
-rw-r--r--audio/amarok/files/patch-amarok_src_mediadevice_mtp_mtpmediadevice.cpp44
2 files changed, 88 insertions, 0 deletions
diff --git a/audio/amarok-kde4/files/patch-amarok_src_mediadevice_mtp_mtpmediadevice.cpp b/audio/amarok-kde4/files/patch-amarok_src_mediadevice_mtp_mtpmediadevice.cpp
new file mode 100644
index 000000000000..a4500070b3b6
--- /dev/null
+++ b/audio/amarok-kde4/files/patch-amarok_src_mediadevice_mtp_mtpmediadevice.cpp
@@ -0,0 +1,44 @@
+--- amarok/src/mediadevice/mtp/mtpmediadevice.cpp
++++ amarok/src/mediadevice/mtp/mtpmediadevice.cpp
+@@ -293,12 +293,13 @@
+ parent_id = getDefaultParentId();
+ }
+ debug() << "Parent id : " << parent_id << endl;
++ trackmeta->parent_id = parent_id;
+
+ m_critical_mutex.lock();
+ debug() << "Sending track... " << bundle.url().path().utf8() << endl;
+ int ret = LIBMTP_Send_Track_From_File(
+ m_device, bundle.url().path().utf8(), trackmeta,
+- progressCallback, this, parent_id
++ progressCallback, this
+ );
+ m_critical_mutex.unlock();
+
+@@ -529,7 +530,7 @@
+ for( MtpMediaItem *it = dynamic_cast<MtpMediaItem*>(items->first()); it; it = dynamic_cast<MtpMediaItem*>(items->next()) )
+ album_object->tracks[i++] = it->track()->id();
+ album_object->no_tracks = items->count();
+- ret = LIBMTP_Create_New_Album( m_device, album_object, 0 );
++ ret = LIBMTP_Create_New_Album( m_device, album_object );
+ if( ret != 0 )
+ {
+ debug() << "creating album failed : " << ret << endl;
+@@ -608,7 +609,7 @@
+ {
+ debug() << "Creating new folder '" << name << "' as a child of "<< parent_id << endl;
+ char *name_copy = qstrdup( name );
+- uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id );
++ uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id, 0 );
+ delete(name_copy);
+ debug() << "New folder ID: " << new_folder_id << endl;
+ if( new_folder_id == 0 )
+@@ -913,7 +914,7 @@
+ if( item->playlist()->id() == 0 )
+ {
+ debug() << "creating new playlist : " << metadata->name << endl;
+- int ret = LIBMTP_Create_New_Playlist( m_device, metadata, 0 );
++ int ret = LIBMTP_Create_New_Playlist( m_device, metadata );
+ if( ret == 0 )
+ {
+ item->playlist()->setId( metadata->playlist_id );
diff --git a/audio/amarok/files/patch-amarok_src_mediadevice_mtp_mtpmediadevice.cpp b/audio/amarok/files/patch-amarok_src_mediadevice_mtp_mtpmediadevice.cpp
new file mode 100644
index 000000000000..a4500070b3b6
--- /dev/null
+++ b/audio/amarok/files/patch-amarok_src_mediadevice_mtp_mtpmediadevice.cpp
@@ -0,0 +1,44 @@
+--- amarok/src/mediadevice/mtp/mtpmediadevice.cpp
++++ amarok/src/mediadevice/mtp/mtpmediadevice.cpp
+@@ -293,12 +293,13 @@
+ parent_id = getDefaultParentId();
+ }
+ debug() << "Parent id : " << parent_id << endl;
++ trackmeta->parent_id = parent_id;
+
+ m_critical_mutex.lock();
+ debug() << "Sending track... " << bundle.url().path().utf8() << endl;
+ int ret = LIBMTP_Send_Track_From_File(
+ m_device, bundle.url().path().utf8(), trackmeta,
+- progressCallback, this, parent_id
++ progressCallback, this
+ );
+ m_critical_mutex.unlock();
+
+@@ -529,7 +530,7 @@
+ for( MtpMediaItem *it = dynamic_cast<MtpMediaItem*>(items->first()); it; it = dynamic_cast<MtpMediaItem*>(items->next()) )
+ album_object->tracks[i++] = it->track()->id();
+ album_object->no_tracks = items->count();
+- ret = LIBMTP_Create_New_Album( m_device, album_object, 0 );
++ ret = LIBMTP_Create_New_Album( m_device, album_object );
+ if( ret != 0 )
+ {
+ debug() << "creating album failed : " << ret << endl;
+@@ -608,7 +609,7 @@
+ {
+ debug() << "Creating new folder '" << name << "' as a child of "<< parent_id << endl;
+ char *name_copy = qstrdup( name );
+- uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id );
++ uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id, 0 );
+ delete(name_copy);
+ debug() << "New folder ID: " << new_folder_id << endl;
+ if( new_folder_id == 0 )
+@@ -913,7 +914,7 @@
+ if( item->playlist()->id() == 0 )
+ {
+ debug() << "creating new playlist : " << metadata->name << endl;
+- int ret = LIBMTP_Create_New_Playlist( m_device, metadata, 0 );
++ int ret = LIBMTP_Create_New_Playlist( m_device, metadata );
+ if( ret == 0 )
+ {
+ item->playlist()->setId( metadata->playlist_id );