Continued work on GEP008: move src/Mime to src/gen/mime.

svn: r14118
This commit is contained in:
Brian Matherly
2010-01-24 20:17:14 +00:00
parent 09b0e50d41
commit cd30f4db2f
20 changed files with 80 additions and 172 deletions

View File

@ -54,7 +54,7 @@ import const
import config
import Utils
import Bookmarks
import Mime
import gen.mime
import gen.lib
from gui.editors import EditMedia, DeleteMediaQuery
import Errors
@ -190,8 +190,8 @@ class MediaView(ListView):
protocol, site, mfile, j, k, l = urlparse.urlparse(d)
if protocol == "file":
name = Utils.fix_encoding(mfile)
mime = Mime.get_type(name)
if not Mime.is_valid_type(mime):
mime = gen.mime.get_type(name)
if not gen.mime.is_valid_type(mime):
return
photo = gen.lib.MediaObject()
photo.set_path(name)