Kodi Community Forum
Hide drives/partitions in Kodi file list (Video/Music/Picture) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Hide drives/partitions in Kodi file list (Video/Music/Picture) (/showthread.php?tid=297545)



Hide drives/partitions in Kodi file list (Video/Music/Picture) - flyingernst - 2016-11-21

Hi,

since I have a dualboot config on one Harddisk I see the Windows and Windows boot partition in the Kodi Filelists inside Kodi/LibreElec.

Is there a way to hide / unmount them?

Thanks, regards,
Michael


RE: Hide drives/partitions in Kodi file list (Video/Music/Picture) - DarrenHill - 2016-11-21

Thread moved to Windows


RE: Hide drives/partitions in Kodi file list (Video/Music/Picture) - chewitt - 2016-11-21

Code:
cp /usr/lib/udev/rules.d/95-udevil-mount.rules /storage/.config/udev.rules.d/95-udevil-mount.rules
nano /storage/.config/udev.rules.d/95-udevil-mount.rules

^^ edit the ENV{ID_FS_LABEL} line to add the partition names that you don't want to mount (check them using 'blkid') then reboot .. and in theory they won't be mounted. Delete the file any time to revert to normal behaviour.


RE: Hide drives/partitions in Kodi file list (Video/Music/Picture) - Prof Yaffle - 2016-11-21

Moving to Linux, as this is LibreELEC and not Windows (they're the 'other' partitions).


RE: Hide drives/partitions in Kodi file list (Video/Music/Picture) - flyingernst - 2016-11-22

Thanks, will Test it tomorrow. Real Live didnt want me today to sit on the Computer :-)

Gesendet von meinem ONEPLUS A3003 mit Tapatalk


RE: Hide drives/partitions in Kodi file list (Video/Music/Picture) - flyingernst - 2016-11-23

sry, I am to new in this thing...
I have following drives:
Code:
/dev/sda1: LABEL="System" UUID="176a0f9f-42a7-49a8-86cb-aadc3567dd24" TYPE="ext4" PARTUUID="9d73bbba-01"
/dev/sda2: LABEL="System-reserviert" UUID="889CD3FA9CD3E0AC" TYPE="ntfs" PARTUUID="9d73bbba-02"
/dev/sda3: LABEL="Windows" UUID="2CE0D8BFE0D89106" TYPE="ntfs" PARTUUID="9d73bbba-03"
/dev/sda4: LABEL="Storage" UUID="1f996d9c-0ebc-4c0e-9850-2bfeed17c5a7" TYPE="ext4" PARTUUID="9d73bbba-04"
/dev/loop0: TYPE="squashfs"
/dev/sdb1: LABEL="USB3Intern" UUID="fdd4437b-7743-d201-e040-437b7743d201" TYPE="ext4" PARTUUID="3da040e0-01"
I want to unmount "System-reserviert" and "Windows"

What do I change in this commands:
Code:
# dont run in "installer" mode
IMPORT{cmdline}="installer"
ENV{installer}=="1", GOTO="exit"

# check for blockdevices, /dev/sd*, /dev/sr* and /dev/mmc*
SUBSYSTEM!="block", KERNEL!="sd*|sr*|mmc*", GOTO="exit"

# check for special partitions we dont want mount
IMPORT{builtin}="blkid"
ENV{ID_FS_LABEL}=="EFI|BOOT|Recovery|RECOVERY|SETTINGS|boot|root0|share0", GOTO="exit"

# /dev/sd* and /dev/mmc* ith partitions/disk and filesystems only and /dev/sr* disks only
KERNEL=="sd*|mmc*", ENV{DEVTYPE}=="partition|disk", ENV{ID_FS_USAGE}=="filesystem", GOTO="harddisk"
KERNEL=="sr*", ENV{DEVTYPE}=="disk", GOTO="optical"
GOTO="exit"

# mount or umount for hdds
LABEL="harddisk"
ACTION=="add", RUN+="/usr/bin/systemctl restart udevil-mount@/dev/%k.service"
ACTION=="remove", RUN+="/usr/bin/systemctl stop udevil-mount@/dev/%k.service"
GOTO="exit"

# mount or umount for opticals
LABEL="optical"
ACTION=="add|change", RUN+="/usr/bin/systemctl restart udevil-mount@/dev/%k.service"
GOTO="exit"

# Exit
LABEL="exit"

thanks


RE: Hide drives/partitions in Kodi file list (Video/Music/Picture) - flyingernst - 2016-11-25

Help please

Gesendet von meinem ONEPLUS A3003 mit Tapatalk


RE: Hide drives/partitions in Kodi file list (Video/Music/Picture) - Prof Yaffle - 2016-11-25

In theory, you simply add the labels of the partitions you *don't* want to mount to the ENV{ID_FS_LABEL}=="..." line, inside the quotes.

I can't 100% be certain that it's simply a case of adding "System-reserviert" and "Windows" into that list, though - I'd defer to chewitt there that blkid give you the appropriate labels (vs. e.g. ls -l /dev/disk/*) - but that's what I'd try. Back up the file before you start editing it, of course...