Auto-detect usb-drives with UDF in player

UDF is mostly universal filesystem for USB-drives. It’s supported out of the box in Linux, OS X and Windows. OSMC auto-mounts usb-drives with UDF under /media/ but kodi-player doesn’t auto detect them. So I have to unmount drives with UDF using console and manually add path to /media/ to each drive.

ext* and exfat drives are mounted and detected by player successfully.

OSMC already supports reading and playing UDF formatted disks out of the box - after all, all commercial DVD movie disks use the UDF file system and OSMC plays commercial DVDs just fine…

Do you only have this problem on particular disks ? Does it only happen with a particular DVD drive ?

You didn’t actually say whether you were trying to play a DVD movie formatted disk or just a UDF disk with files on it, so I’m assuming the former.

The usual cause of Kodi not correctly detecting a DVD movie disk is read errors, caused either by the disk, the drive or a combination of the two.

Please provide a full set of debug logs taken after inserting a disk that is not recognised so we can see if this is the case.

Not DVD (or any optical) disk. But USB flash drive formatted to UDF filesystem. It’s 100% correct and being successfully mounted under /media/ and played after manually adding /media/ to Kodi’s video sources. The only problem that it’s not auto detected by Kodi (not the OS) and was not shown in Kodi’s GUI.

Are you saying that your UDF formatted USB drive contains a full DVD video file system structure ? (VIDEO_TS folders etc)

Or is it just a UDF file system containing standard video files, that you are somehow expecting to be automatically detected ? (You still haven’t said) Either way, Kodi will not do this.

Detection of UDF file system formatted DVD’s is hard coded inside Kodi itself and Kodi actually reads the drive at the block layer (/dev/sr0) to detect the disk and decide whether it is a DVD video disk or not - this is completely outside of the system automounter (udisks-glue in OSMC) which mounts the drives file system under /media. (Kodi can actually play a DVD movie disk that is not even mounted in the file system at all because it reads the block device directly - it doesn’t play the movie from the files mounted under /media)

If your USB drive is formatted to mimic a DVD movie disk - eg UDF file system and VIDEO_TS folders and so on then I highly doubt that will work because Kodi’s DVD detection code is written to monitor for UDF file systems on optical media, and will not examine what it considers to be a hard drive for content that it expects to find on optical disks.

On the other hand if your UDF file system just contains normal video files then like any other file system, this will not “auto play” or appear automatically in Kodi - you need to browse to it via Video->Files where you will find a top level entry for each mounted removable drive. This is the way Kodi has always worked for removable media, besides the special case of an optical DVD movie formatted disk or CD Audio disk.

Yes, I have UDF filesystem with some normal (mkv) video files on my USB-drive. But there is no entry for the usb drive in Video->Files. That’s the problem which I’m trying to describe. If USB-drive is formated using exfat or ext2 then I have the entry in Video->Files (just as I’ve told in my first message), if UDF - not. I have it mounted under /media/ , I can read or copy or play files from it but there is no entry in Video->Files . That’s the problem.

If udisks-glue is mounting the drive correctly under /media but Kodi is not showing the drive under Video->Files then that will be a bug within Kodi itself.

You might have better luck reporting that directly to the Kodi devs at http://forum.kodi.tv in the Linux or Raspberry Pi sections - I suspect UDF file systems on a non-optical disk has simply not been tested or thought about when Kodi was designed.

Before that double check that manually refreshing the file list does not show the drive just in case its an issue with detecting a disk change event - you can do this by exiting back out of the file list after the drive is connected and going back in, or, by plugging yet another drive in at the same time (in a format that will be recognised) which will trigger a refresh of the drive list.

If it still doesn’t appear that’s definitely a Kodi bug IMO.