Kodi (16.1, built Dec. 4th, 2016) running on Arch Linux (4.4.37-1-ARCH) on a Pi 2 B keeps listing all attached flash drives automatically. How to prevent automatic listing of (selected) mounted flash drives?
There are two USB flash drives attached to the system and mounted via fstab using their UUID. They have specific mount points that fit their use. In fact one of those flash drives got nothing to do with any media files of use for Kodi. In Kodi's main menus "Picture", "Video / Files", and "Music / Files" I manually created links to the relevant directories (e.g. to /media/music using "Add Music Source" in "Music / Files" of the on-screen menu). In those menus however Kodi choses to automatically include the two flash drives - which is of little use to me and clutters the interface.
In the on-screen menu I haven't been able to find a relevant setting to change this behaviour, albeit selecting all "advanced" settings. Fiddling with the advancedsettings.xml especially with the <excludefromlisting> settings did not change a thing either.
I suspect UDisks to be the culprit here as kodi.log shows after enabling debug logs:
INFO: UDisks: Added /bla/bla
So I tried to hide selected partitions creating a udev rule (/etc/udev/rules.d/10-local.rules)
ENV{ID_FS_UUID}=="XXXX-XXXX", ENV{UDISKS_PRESENTATION_HIDE}="1"
Again, to no avail. Kodi just does not care. As per @goldilocks comment that udev rule makes little sense since it mixes udisks and udisks2 notations. Trying a rule for udisks however (setting aside the issue of changing block device names for the moment) did not change a thing either.
KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"
So again, how to prevent those drives to show up?
ID_FS_UUIDas a trigger to setUDISKS_PRESENTATION_HIDE, although the former is paired withUDISKS_IGNORE. This may be because udev has a lot of gotchas with using theENVstuff, or it may simply be because (as stated there) "if you are using udisks2, the above will not work asUDISKS_PRESENTATION_HIDEis no longer supported. Instead, useUDISKS_IGNORE...". – goldilocks Dec 20 '16 at 15:59