def convert_mp3(fpath, upload): """Convert mp3 files """ oggname = None logger.info("(convert_upload) [%s] as [%s]" % (fpath, upload.content_type)) datas = readtags(fpath) if datas != {}: oggname = mp3ogg(fpath, datas) upload.status = "uploaded" upload.save() return oggname