-from os import path as os_path, walk as os_walk
-from string import lower
-from mimetypes import guess_type
-
-def getExtension(file):
- p = file.rfind('.')
- if p == -1:
- ext = ""
- else:
- ext = file[p+1:]
-
- return lower(ext)
+from os import path as os_path, walk as os_walk, system
+from mimetypes import guess_type, add_type
+
+add_type("application/x-debian-package", ".ipk")
+add_type("application/ogg", ".ogg")
+add_type("audio/x-flac", ".flac")
+add_type("application/x-dream-package", ".dmpkg")
+add_type("application/x-dream-image", ".nfi")
+add_type("video/MP2T", ".ts")
+add_type("video/x-dvd-iso", ".iso")
+add_type("video/x-matroska", ".mkv")
+add_type("audio/x-matroska", ".mka")