return "application/x-debian-package"
elif ext == "ogg":
return "application/ogg"
+ elif ext == "dmpkg":
+ return "application/x-dream-package"
+ elif ext == "ts":
+ return "video/MP2T"
+ elif ext == "iso":
+ return "video/x-dvd-iso"
+ elif file[-12:].lower() == "video_ts.ifo":
+ return "video/x-dvd"
return type
class Scanner:
def __init__(self, path, mimetype = None, size = None, autodetect = True):
self.path = path
if mimetype is None and autodetect:
- (self.mimetype, _) = guess_type(path)
+ self.mimetype = getType(path)
else:
self.mimetype = mimetype
self.size = size