From ba4c814c7ff26ff821ea362632fd6bb47bf93066 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Thu, 5 Apr 2018 11:42:48 +0100
Subject: [PATCH] udevprovider: filter out OE specific mounts

---
 xbmc/platform/linux/storage/UDevProvider.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

--- a/xbmc/platform/linux/storage/UDevProvider.cpp
+++ b/xbmc/platform/linux/storage/UDevProvider.cpp
@@ -147,6 +147,20 @@ void CUDevProvider::GetDisks(VECSOURCES&
       continue;
     }
 
+    // LE: filter out Libreelec specific mounts
+    if (strstr(mountpoint, "/flash"))
+    {
+      udev_device_unref(device);
+      continue;
+    }
+
+    if (strstr(mountpoint, "/storage"))
+    {
+      udev_device_unref(device);
+      continue;
+    }
+    // OE
+
     // look for devices on the usb bus, or mounted on */media/ (sdcards), or optical devices
     const char *bus = udev_device_get_property_value(device, "ID_BUS");
     const char *optical = udev_device_get_property_value(device, "ID_CDROM"); // matches also DVD, Blu-ray
