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
return "audio/x-flac"
elif ext == "dmpkg":
return "application/x-dream-package"
+ elif ext == "nfi":
+ return "application/x-dream-image"
elif ext == "ts":
return "video/MP2T"
elif ext == "iso":
# convert to list
paths_to_scan = list(paths_to_scan)
-
+
from Components.Harddisk import harddiskmanager
- blockdev = mountpoint.split('/')[2]
- error, blacklisted, removable, is_cdrom, partitions = harddiskmanager.getBlockDevInfo(blockdev)
+ blockdev = mountpoint.rstrip("/").rsplit('/',1)[-1]
+ error, blacklisted, removable, is_cdrom, partitions, medium_found = harddiskmanager.getBlockDevInfo(blockdev)
# now scan the paths
for p in paths_to_scan: