Opened 17 years ago
Closed 17 years ago
#3077 closed patch (fixed)
Default CD Device selection
Reported by: | Owned by: | Nigel | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | cd dvd detection default |
Cc: | Ticket locked: | no |
Description
mythtv-defaultcddevices.diff (No patch dependencies): This patch adds entries in General Settings for specifying default CD and DVD devices to use within MythTV. Adds two database settings: defaultCDDevice and defaultDVDDevice. getCDROMBlockDevices is changed from a protected to a public member in mythmediamonitor.h allowing non class members to enumerate CDROM drives. The stringlist returned from this is used to populate a list of CD/DVD drives in the drive selection comboboxes (comboboxes are left editable should the user wish to manually enter an undetected device).
mythmusic-cddevices.diff (depends on mythtv-defaultcddevices.diff): This patch modifies cd device selection comboboxes to get list of devices from mediamonitor and adds a "default" entry. It also modifies areas of the code which use CD devices to check for "default" and use the mythtv default device if set. cd writer detection using cdrecord --scanbus is removed since this doesn't work on recent kernel versions and instead relies on the user to select a writeable device.
mythvideo-cddevices.diff (depends on mythtv-defaultcddevices.diff): This patch modifies VCD and DVD device selection comboboxes to get list of devices from mediamonitor and adds a "default" entry. It also modifies areas of the code which use CD devices to check for "default" and use the mythtv default device if set.
mytharchive-cddevices.diff (depends on mythtv-defaultcddevices.diff): This patch modifies DVD device selection comboboxes to get list of devices from mediamonitor and adds a "default" entry. It also modifies mytharchivehelper/main.cpp and mythburn.py to check for "default" and use the mythtv default device if set.
Attachments (8)
Change History (21)
Changed 17 years ago by
Attachment: | mythtv-defaultcddevices.diff added |
---|
Changed 17 years ago by
Attachment: | mytharchive-cddevices.diff added |
---|
Add default cd/dvd device selection to mytharchive
Changed 17 years ago by
Attachment: | mythmusic-cddevices.diff added |
---|
Add default cd/dvd device selection to mythmusic
Changed 17 years ago by
Attachment: | mythvideo-cddevices.diff added |
---|
Add default cd/dvd device selection to mythvideo
comment:1 Changed 17 years ago by
Small review
1) I agree that having a default device selector is useful, and having the burning functions seperate is also good. Having four defaults seems overkill, though? Maybe just one DefaultBurner? setting?
2) Most of your code compares the *DeviceLocation? setting to "default", and then looks up another setting. Why not just use the first setting? (i.e. make the UI GetCDROMBlockDevices changes in programs/mythfrontend/globalsettings.cpp)
3) mythvideo/mythvideo/main.cpp adds "/2" onto the URL/URI/MRI/thingy. Why? Doesn't this always force one particular track?
4) Prepending /dev into the paths in the GUI selectors is a bit wasteful, and won't work on Windows or Mac OS X. (Note, however, that I do something equally bad in mythvideo/main.cpp on OS X). Maybe a new method, MythMediaMonitor::GetCDMedias() that already prepends this for appropriate OSs?
5) I am wondering if the user really needs the /dev name in the GUI selector? Ideally, we would present the device name (e.g. "PIONEER DVD-RW DVR-108" or "LITE-ON DVDRW SOHW-832S") parsed from /proc/ide/hd?model
Changed 17 years ago by
Attachment: | mythvideo-cddevices.2.diff added |
---|
Mythvideo patch v2 removes "/2" from device that accidently slipped into the patch
comment:2 Changed 17 years ago by
Please mark this ticket as invalid for now since it will no longer apply to head. I need to review the mythmediamonitor changes by Nigel and provide an updated patch.
comment:4 Changed 17 years ago by
Updated default-cd.diff patch: -Fixes typo in mytharchive part (defaultDVDWriter->defaultWriter). -Adds missing bits to mythmusic (playback).
I've tested the CD parts of this, with a single cd drive. It'll be a few days before I can sort out a second drive and a dvd disk to test with. Looks good so far though.
mythburn.py uses MythArchiveDVDLocation which needs to change to use MediaMonitor:defaultWriter somehow - not sure how to do this though given it's a python script.
comment:5 Changed 17 years ago by
comment:7 Changed 17 years ago by
comment:8 Changed 17 years ago by
Owner: | changed from Isaac Richards to Nigel |
---|---|
Status: | new → assigned |
comment:9 Changed 17 years ago by
comment:10 Changed 17 years ago by
comment:11 Changed 17 years ago by
comment:12 Changed 17 years ago by
(In [13364]) Multiple DVD drive with media manager in Video Plugin. See #3077. See #2598. Not real happy about the structure here (TitleDialog? and DVDRipBox need to share the same dvd_device, and it the needs to get passed to mtd for use?), but that will have to wait for some extra, um, "brave pills". Until then, setting DVDDeviceLocation to "default" should let you play from multiple drives, but will break ripping.
Changed 17 years ago by
Attachment: | mediamonitor-scd-fix.diff added |
---|
Fix model lookup for cd devices with scd0/sr0 device names
comment:13 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
OK. The only parts that I have not committed are the mtd default (which cannot use the defaultDVD method as it stands, because on a multiple DVD machine, it will try and pop up a dialog box), and the removal of the setup (UI) stuff.
[BR]]
The former needs something like a "non-interactive" flag in the methods. I had a reworking of mtd that let callers pass in the drive to monitor, but lost that when a disk image went bad. For now, it can probably stay as is.
The latter? I am still thinking about whether the UI should let the user choose default or a drive from a list, or if it should just be completely missing.
Either way, I think it is time to close this ticket
Add default cd/dvd device selection