Mercurial > libervia-web
diff browser_side/file_tools.py @ 398:462fc3359ee3
browser_side: radiocol accepts mime type audio/mp3 in addition to audio/mpeg
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 11 Mar 2014 12:31:29 +0100 |
parents | f539f6f8ee9c |
children | d52f529a6d42 |
line wrap: on
line diff
--- a/browser_side/file_tools.py Tue Mar 11 11:53:03 2014 +0100 +++ b/browser_side/file_tools.py Tue Mar 11 12:31:29 2014 +0100 @@ -58,7 +58,10 @@ return False (size, filetype) = self.getFileInfo() if self.types and filetype not in [x for (x, y, z) in self.types]: - types = ["- %s (%s)" % (z, y) for (x, y, z) in self.types] + types = [] + for type_ in ["- %s (%s)" % (z, y) for (x, y, z) in self.types]: + if type_ not in types: + types.append(type_) Window.alert('This file type is not accepted.\nAccepted file types are:\n\n%s' % "\n".join(types)) return False if size > self.max_size * pow(2, 20):