1 from Plugins.Plugin import PluginDescriptor
2 from Components.Scanner import scanDevice
5 print "execute", option
9 (_, scanner, files, session) = option
10 scanner.open(files, session)
12 def mountpoint_choosen(option):
16 from Screens.ChoiceBox import ChoiceBox
18 (description, mountpoint, session) = option
19 res = scanDevice(mountpoint)
21 list = [ (r.description, r, res[r], session) for r in res ]
27 session.openWithCallback(execute, ChoiceBox,
28 title = "The following files were found...",
32 from Screens.ChoiceBox import ChoiceBox
34 from Components.Harddisk import harddiskmanager
36 parts = [ (r.description, r.mountpoint, session) for r in harddiskmanager.getMountedPartitions() ]
37 session.openWithCallback(mountpoint_choosen, ChoiceBox, title = "Please Select Medium to be Scanned", list = parts)
39 def main(session, **kwargs):
42 def Plugins(**kwargs):
43 return PluginDescriptor(name="MediaScanner", description="Scan Files...", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)