do not show inaccessible devices in deviceselection
authoracid-burn <acidburn@opendreambox.org>
Fri, 13 Feb 2009 07:17:55 +0000 (08:17 +0100)
committeracid-burn <acidburn@opendreambox.org>
Fri, 13 Feb 2009 07:17:55 +0000 (08:17 +0100)
lib/python/Plugins/Extensions/MediaScanner/plugin.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 88b917e..2c31197
@@ -42,6 +42,9 @@ def scan(session):
 
        parts = [ (r.description, r.mountpoint, session) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)]
        if len(parts):
+               for x in parts:
+                       if not access(x[1], F_OK|R_OK):
+                               parts.remove(x) 
                session.openWithCallback(mountpoint_choosen, ChoiceBox, title = _("Please Select Medium to be Scanned"), list = parts)
 
 def main(session, **kwargs):