Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
denise 2012-09-18 16:49:52 -04:00
commit cc966ca62b
3 changed files with 9 additions and 7 deletions

View file

@ -17,12 +17,12 @@ class BitrateFormatter
public function format() public function format()
{ {
$Kbps = bcdiv($this->_bitrate, 1000, 0); $kbps = bcdiv($this->_bitrate, 1000, 0);
if ($Kbps == 0) { if ($kbps == 0) {
return ""; return "";
} else { } else {
return "{$Kbps} Kbps"; return "$kbps Kbps";
} }
} }
} }

View file

@ -257,6 +257,8 @@ def normalized_metadata(md, original_path):
'MDATA_KEY_FILEPATH' : lambda x: os.path.normpath(x), 'MDATA_KEY_FILEPATH' : lambda x: os.path.normpath(x),
'MDATA_KEY_BPM' : lambda x: x[0:8], 'MDATA_KEY_BPM' : lambda x: x[0:8],
'MDATA_KEY_MIME' : lambda x: x.replace('audio/vorbis','audio/ogg'), 'MDATA_KEY_MIME' : lambda x: x.replace('audio/vorbis','audio/ogg'),
# Whenever 0 is reported we change it to empty
#'MDATA_KEY_BITRATE' : lambda x: '' if str(x) == '0' else x
} }
new_md = remove_whitespace(new_md) # remove whitespace fields new_md = remove_whitespace(new_md) # remove whitespace fields