3

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?

  • I notice you've actually mixed and matched some things from that Arch wiki page -- namely, you're using ID_FS_UUID as a trigger to set UDISKS_PRESENTATION_HIDE, although the former is paired with UDISKS_IGNORE. This may be because udev has a lot of gotchas with using the ENV stuff, or it may simply be because (as stated there) "if you are using udisks2, the above will not work as UDISKS_PRESENTATION_HIDE is no longer supported. Instead, use UDISKS_IGNORE...". – goldilocks Dec 20 '16 at 15:59
  • Kodi's page reads that UDISKS_IGNORE is for udisks2 and thus not working, I guess I will look into it again – Ghanima Dec 20 '16 at 16:03
  • You've found some cracks to fall between, in other words. – goldilocks Dec 20 '16 at 16:07
  • @goldilocks I was really hoping that there is a way to handle the situation in Kodi itself (... and of course to get a hat along the way). – Ghanima Dec 27 '16 at 21:50
  • Nearly three years on, it seems there's still no solution to this :( I want a mounted drive, I just don't want kodi to show it. – joelittlejohn Aug 31 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.