Opened 15 years ago
Closed 15 years ago
Last modified 15 years ago
#601 closed enhancement (fixed)
Support hotpluggable disc drives in MediaMonitor
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.20 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
This patch implements support for hotplugging removable disc drives in MediaMonitor?. A new MythMediaDevice? subclass implements a generic hard disc device. In addition it supports mounting and unmounting via pmount if it is available. If you use pmount you don't need to explicitly define mount points in /etc/fstab. Make sure the user running mythfrontend is a member of the plugdev or equivalent group.
To get hotplug message you will need to (or whatever your distribution does, this is for Debian)
install contrib/mythtv.rules into /etc/udev/ create a link in /etc/udev/rules.d to the newly install /etc/udev/mythtv.rules install contrib/mythtv_media_monitor.sh into /etc/udev/scripts/
This requires udev version 0.71.
There is also a new global keybinding called 'EJECT' that will eject devices. If you have only one device (known to the MediaMonitor?) it will be unmounted and ejected. If you have more than one a dialog box will popup so you can select the device to eject. You can use this to safely remove USB sticks etc.
This code is related to my code to get MythGallery to access my digital camera, I will submit that patch soon.
Attachments (3)
Change History (8)
Changed 15 years ago by
Attachment: | hotplug_hdd.diff added |
---|
comment:1 Changed 15 years ago by
Milestone: | → 0.20 |
---|---|
Owner: | changed from Isaac Richards to danielk |
Status: | new → assigned |
comment:2 Changed 15 years ago by
Changed 15 years ago by
Attachment: | hotplug_hdd_v2.diff added |
---|
comment:3 Changed 15 years ago by
I've just attached version 2 of this patch which has the following changes
I've fixed up the functionality such that the DVD menu gets displayed or the DVD starts playing when one is inserted. During testing I noticed that playing the DVD from the DVD menu fails. Playing directly or selecting play DVD from the CD/DVD menu works. I got the same behaviour when I did a clean recompile without any of my patches applied.
Ejectable drives (ie CD/DVD drives) are always in the eject menu so you can eject the tray when no disc is present. Non ejectable drives are only in the eject menu when they are mounted. I'm not quite sure what you mean by inserting a device more than once, but I've tested ripping out the USB stick without unmounting and the stale devices are removed the eject menu.
I've made MythMediaDevice? forget labels etc when the device enters the MEDIASTAT_OPEN state. This prevents the label of the previous disc being shown when no disc is present.
I've also prevented nested instances of the eject dialog.
Changed 15 years ago by
Attachment: | hotplug_hdd_v3.diff added |
---|
Same as v2 except with the new files included
comment:4 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [9365]) Closes #601, by applying patch from Aaron McCarthy?.
This adds some better media monitoring for Linux users. In order to get the full benefit you need udev 0.71+ and you need pmount, and you need to install the two udev files in contrib.
There is a new binding "EJECT" which will unmount and, if possible, physically eject removable media. I did not add a default binding, but "E" makes sense..
Not quite ready for prime time:
I haven't looked closely at the code yet so there may be more problems; but this is what I noticed when testing functionality. The core functionality of noticing and mounting hotplug drives works for me at least.