Ask / Submit
0

MTP - bad performance

asked 2018-02-10 16:26:33 +0200

Leon gravatar image

My SD card has about 3500 MP3 files. If I connect the phone (XPERIA X) via USB/MTP to copy for example only two recorded videos to my desktop computer, the application (desktop-side) is creating the file-list for a long time and hangs afterwards (different MTP-clients where tested).

Is there a way to blacklist the /media/sdcard/${UUID}/Music/ folder (or whitelist ...)?

edit retag flag offensive close delete

Comments

1

You could make a .nomedia file and place in the Music folder. Works for me on Jolla1.

Navigate to Music folder on SD card and do the following;

devel-su cat > .nomedia

After that, run tracker with

tracker reset -e

Your music files shouldn't be found now.

Edz ( 2018-02-10 16:57:13 +0200 )edit

Good to known that such exclude function exists but the main problem will not be addressed (visibility via MTP) with this approach. This will disable the visibility to all applications. The media player will not see the MP3 files anymore.

Leon ( 2018-02-10 18:47:08 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-02-10 18:53:35 +0200

Leon gravatar image

updated 2018-02-10 22:12:12 +0200

The OS seems to exclude some files from MTP. Therefore I tried this (patch file!):

--- /usr/share/mtp/blacklist-sd.conf    1970-07-24 09:05:45.969999999 +0100
+++ /usr/share/mtp/blacklist-sd.conf    2018-02-10 16:10:38.272007050 +0100
@@ -0,0 +1 @@
+Music

--- /etc/fsstorage.d/sd-storage-conf.xml    2018-02-10 16:12:51.309872190 +0100
+++ /etc/fsstorage.d/sd-storage-conf.xml    2018-02-10 16:13:12.496899728 +0100
@@ -1,2 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<storage name="media" blockdev="/dev/mmcblk1" description="SD Card" removable="true"></storage>
+<storage name="media" blockdev="/dev/mmcblk1" description="SD Card" removable="true">
+  <blacklist>/usr/share/mtp/blacklist-sd.conf</blacklist>
+</storage>

but it does not get recognised. Maybe someone has more insights (package mtp-vendor-configuration-sailfish) ... thx!

Changelog: Add Fix / relative path

edit flag offensive delete publish link more

Comments

OK. It works. The only change of the patch is to put a relativ path

 # cat /usr/share/mtp/blacklist-sd.conf 
Music
Leon ( 2018-02-10 19:28:57 +0200 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2018-02-10 16:26:33 +0200

Seen: 287 times

Last updated: Feb 10