allow gstreamer to signalize missing plugins to the gui (requires reconfiguring enigm...
[enigma2.git] / lib / python / Components / Scanner.py
index c217aa5c689d5eb0d77f19523cec1c2dcc0929b5..5a26a7d4bcd277b681484e18ac77f186052e7104 100644 (file)
@@ -16,6 +16,7 @@ def getExtension(file):
 
 def getType(file):
        (type, _) = guess_type(file)
 
 def getType(file):
        (type, _) = guess_type(file)
+       print "guessed type:", type
        if type is None:
                # Detect some mimetypes unknown to dm7025
                # TODO: do mimetypes.add_type once should be better
        if type is None:
                # Detect some mimetypes unknown to dm7025
                # TODO: do mimetypes.add_type once should be better
@@ -24,6 +25,8 @@ def getType(file):
                        return "application/x-debian-package"
                elif ext == "ogg":
                        return "application/ogg"
                        return "application/x-debian-package"
                elif ext == "ogg":
                        return "application/ogg"
+               elif ext == "flac":
+                       return "audio/x-flac"
                elif ext == "dmpkg":
                        return "application/x-dream-package"
                elif ext == "ts":
                elif ext == "dmpkg":
                        return "application/x-dream-package"
                elif ext == "ts":
@@ -129,13 +132,9 @@ def scanDevice(mountpoint):
        # convert to list
        paths_to_scan = list(paths_to_scan)
        
        # convert to list
        paths_to_scan = list(paths_to_scan)
        
-       from Components.Harddisk import HarddiskManager 
-       class CdromManager(HarddiskManager):
-               def __init__(self):
-                       pass
-       cdaman = CdromManager()
+       from Components.Harddisk import harddiskmanager 
        blockdev = mountpoint.split('/')[2]
        blockdev = mountpoint.split('/')[2]
-       error, blacklisted, removable, is_cdrom, partitions = cdaman.getBlockDevInfo(blockdev)
+       error, blacklisted, removable, is_cdrom, partitions = harddiskmanager.getBlockDevInfo(blockdev)
 
        # now scan the paths
        for p in paths_to_scan:
 
        # now scan the paths
        for p in paths_to_scan: