CC-2633: media monitor crashes on non-ascii files and metadata

- fixed bug for the case where mutagen return None for metadata
- fixed bug for non-ascii files and metadata
This commit is contained in:
James 2011-08-04 18:36:40 -04:00
parent 6c6776e2ce
commit 938c503e85
5 changed files with 49 additions and 28 deletions

View file

@ -402,7 +402,7 @@ class AirTimeApiClient(ApiClientInterface):
req = urllib2.Request(url, data)
response = urllib2.urlopen(req).read()
logger.info("update media %s", response)
logger.info("update media %s, filepath: %s, mode: %s", response, md['MDATA_KEY_FILEPATH'], mode)
response = json.loads(response)
elapsed = (time.time() - start)