Linux DVD Automount
#16
Nothing to bump .. no logfiles no issue
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#17
(2016-08-10, 22:32)fritsch Wrote: Nothing to bump .. no logfiles no issue

Erm....

(2016-07-31, 19:27)dcrdev Wrote: Here is the full log - there were some references to a private url which I have replaced with domain.com (if you were wondering).

http://pastebin.com/RMbtRU24

As for libdvdcss support - I wasn't aware that any of it was included in the base Kodi; I thought it was just a dependency. You are correct in assuming that I'm running a Kodi package that doesn't pull it down by default - but I built libdvdcss from git and encrypted dvds do play if I browse the disc via Kodi; they just don't play automatically.

As I mentioned in my first post Kodi seems to be treating dvds as removable storage instead of optical media.


?
Reply
#18
Working with LibreELEC? If yes -> Fedora issue. Works fine for me using udevil, so no idea what is wrong.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#19
Well finally got this working the way it's supposed to and I'm completely confused.

So I did some testing against various different mounting methods and all of them produced the same result - then purely by fluke I inserted a DVD with absolutely no automounting solution in place (or even installed) i.e. no udisks, udevil, udev rule(s) or otherwise and astonishingly a observed a DVD autoplay! So it appears that Kodi uses something other than udisks to natively mount optical discs, perhaps libdvdread?

That isn't the end of the story though because Kodi still can't natively mount non-optical media such as USB media without the aid of udisks. Now obviously udisks is conflicting with whatever Kodi uses to mount optical discs (I suspect this is down to timing) and since udisks doesn't have any configurable options to blacklist devices, it is not a viable option. In comes udevil - one easy directive in udevil.conf "forbidden_devices = /dev/sr0," hey presto everything works!

I'm posting this because it's been the biggest ball ache in the universe to get this sorted and I hope it helps someone else! I must say there is a disappointing level of documentation on the subject of automounting and almost everything I've read contradicts the solution above.

Also...

Since I'm running Kodi in standalone mode on a server that isn't necessarily always a htpc, I've put together these systemd templates to start Kodi and then start the udevil devmon daemon - they are daisy chained together so if you stop Kodi devmon will stop watching for devices to mount.

[email protected] systemctl enable kodi@<username>.service
Code:
[Unit]
Description = Kodi Media Center
After = systemd-user-sessions.service network.target sound.target emby-server.service httpd.service
Requires = automount@%i.service
RequiresMountsFor = /storage
Wants = tvheadend.service

[Service]
User = %i
Group = %i
Type = simple
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :0 -nolisten tcp vt7
SuccessExitStatus=1
Restart = always
RestartSec = 1

[Install]
WantedBy = multi-user.target

[email protected] - this one is triggered via Kodi, no need to enable
Code:
[Unit]
Description=Automount Service
StopWhenUnneeded=yes

[Service]
Type=simple
User=%i
EnvironmentFile=/etc/conf.d/devmon
ExecStart=/usr/bin/devmon $ARGS

[Install]
WantedBy=multi-user.target
Reply
#20
How many times do I have to say, DVDs do NOT need to be mounted to play.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#21
Lol looking back a page you did say that -

That being said and correct me if I'm wrong but udisks is the only officially supported method of mounting disks from within Kodi? Since it's Kodi that's calling udisks surely Kodi should be ignoring optical media as udisks a) Is not configurable b) Only accepts blacklisting in the form of the ENV{UDISKS_PRESENTATION_HIDE} and ENV{UDISKS_IGNORE} variables, which Kodi doesn't respect! and c) Kodi is the application calling udisks in the first place via dbus ?

As I say I think this has got to be a timing thing - udisks mount happening too fast. Looking at the OpenELEC git repo their udevil implementation has udev rules that call udevil specifically for optical media; there's also no blacklisting going on in their configuration file either. So I'm guessing in the case of OpenELEC what happens is:

1) Insert Disc
2) Kodi attempts to play disc 3a) Successfully 3b) Unsuccessfully.
3a) Kodi plays video - device is in use and udevil mount fails.
3b) Kodi can't play video - device is free and udevil mount succeeds.

But in my case things are running in reverse - there's just so many variables in process that it's impossible to say why that's happening. What I can say is that it affects both Kodi 16.1, 17.1 Alpha 3 and 17.1 Beta 1 across the board on Fedora 24 having tried a selection of drives and builds.

I just think that maybe there should be something (more detailed) in the Wiki regarding this (which I'd be more than happy to contribute to) as not everyone wants to run LibreELEC and/or KodiUbuntu.
Reply

Logout Mark Read Team Forum Stats Members Help
DVD Automount0