Bugzilla – Bug 14668
udev notification support
Last modified: 2010-04-08 17:24:49 UTC
Add api so when disks and cards are added a ui can be displayed and actions taken.
== Auto-comment from SVN commit #8000 to the jive repo by richard == == https://svn.slimdevices.com/jive?view=revision&revision=8000 == Fixed Bug #14668 Added udev notification in SqueezePlay, to detect device installation/removal. This will allow dialogs to be displayed when usb or sd cards are used. An example of how this can be used to detect usb devices follows. The "usb" is a filter (lua regex) to used before calling the function. Using "" will show all events. Index: share/applets/SqueezeboxFab4/SqueezeboxFab4Meta.lua =================================================================== --- share/applets/SqueezeboxFab4/SqueezeboxFab4Meta.lua (revision 7980) +++ share/applets/SqueezeboxFab4/SqueezeboxFab4Meta.lua (working copy) @@ -92,6 +92,7 @@ meta:registerService("poweroff") meta:registerService("reboot") meta:registerService("wasLastShutdownUnclean") + meta:registerService("addUeventListener") end Index: share/applets/SBSSettings/SBSSettingsMeta.lua =================================================================== --- share/applets/SBSSettings/SBSSettingsMeta.lua (revision 7980) +++ share/applets/SBSSettings/SBSSettingsMeta.lua (working copy) @@ -5,6 +5,8 @@ local Framework = require("jive.ui.Framework") +local debug = require("jive.utils.debug") + local appletManager = appletManager local jiveMain = jiveMain @@ -23,6 +25,14 @@ end +function configureApplet(meta) + appletManager:callService("addUeventListener", "usb", function(evt, msg) + log:warn("UDEV: ", evt) + debug.dump(msg) + end) +end + + --[[ =head1 LICENSE
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release. If you are still seeing this issue, please let us know!