CC-5709: Airtime Analyzer
* Fixed some unit tests that broken when I dropped python-magic in favour of mutagen for MIME type detection
This commit is contained in:
parent
0a906ba6ec
commit
bc72a6626e
4 changed files with 14 additions and 13 deletions
|
@ -52,7 +52,7 @@ class MetadataAnalyzer(Analyzer):
|
|||
try:
|
||||
#Special handling for getting the # of channels from MP3s. It's in the "mode" field
|
||||
#which is 0=Stereo, 1=Joint Stereo, 2=Dual Channel, 3=Mono. Part of the ID3 spec...
|
||||
if metadata["mime"] == "audio/mpeg":
|
||||
if metadata["mime"] in ["audio/mpeg", 'audio/mp3']:
|
||||
if info.mode == 3:
|
||||
metadata["channels"] = 1
|
||||
else:
|
||||
|
|
|
@ -98,7 +98,8 @@ def send_http_request(picklable_request, retry_queue):
|
|||
logging.error("HTTP request failed with unhandled exception. %s" % str(e))
|
||||
# Don't put the request into the retry queue, just give up on this one.
|
||||
# I'm doing this to protect against us getting some pathological request
|
||||
# that breaks our code. I don't want us having
|
||||
# that breaks our code. I don't want us pickling data that potentially
|
||||
# breaks airtime_analyzer.
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue