Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 3 years ago

Closed 3 years ago

#9519 closed Patch - Feature (fixed)

[PATCH] Use DBus to detect device changes

Reported by: Lawrence Rust <lvr@…> Owned by: stuartm
Priority: minor Milestone: 0.25
Component: MythTV - General Version: Master Head
Severity: medium Keywords: DBus MediaMonitor UDev
Cc: Ticket locked: no

Description

This patch upgrades libmyth/mediamonitor-unix.cpp to use the DBus message bus to detect changes to removable media.

Currently, to detect the insertion of USB drives and key-disks the code requires changes to udev configuration files, needing root permission, and is very Linux specific. This patch uses UDisks http://hal.freedesktop.org/docs/udisks/ messages which is a standard across many *nix systems. In addition the code is simpler, provides more information on the devices and most importantly needs no changes to system configuration. If the QT DBus module is not present the code will fallback to the current system.

Attachments (1)

1056-mediamonitor-unix-dbus.diff (15.7 KB) - added by Lawrence Rust <lvr@…> 3 years ago.

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by Lawrence Rust <lvr@…>

comment:1 Changed 3 years ago by beirdo

  • Owner set to stuartm
  • Status changed from new to assigned

comment:2 Changed 3 years ago by Github

  • Milestone changed from unknown to 0.25
  • Resolution set to fixed
  • Status changed from assigned to closed

Use DBUS to detect media insertion or removal

This patch upgrades libmyth/mediamonitor-unix.cpp to use the DBus
message bus to detect changes to removable media.

Currently, to detect the insertion of USB drives and key-disks the code

requires changes to udev configuration files, needing root permission,
and is very Linux specific. This patch uses UDisks
http://hal.freedesktop.org/docs/udisks/ messages which is a standard
across many *nix systems. In addition the code is simpler, provides more
information on the devices and most importantly needs no changes to
system configuration. If the QT DBus module is not present the code will
fallback to the current system.

Closes #9519

Signed-off-by: Stuart Morgan <smorgan@…>

Branch: master
Changeset: 06a98ff94bfff5836945c92fb1b49c9002e9015d

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.