Fixed up icecast stream parser

Added debug filter to logging
This commit is contained in:
Fergal Moran
2013-06-21 12:12:27 +01:00
parent 592302ec06
commit 6007d42946
2 changed files with 12 additions and 5 deletions

View File

@@ -15,10 +15,17 @@ LOGGING = {
'format': '%(levelname)s %(message)s'
},
},
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler',
'include_html': True
},
'console': {
'level': 'DEBUG',

View File

@@ -126,11 +126,11 @@ def live_now_playing(request):
return HttpResponse(
simplejson.dumps({
'stream_url': 'http://%s:%s/%s' % (
localsettings.JS_SETTINGS['LIVE_STREAM_URL'] %
localsettings.JS_SETTINGS['LIVE_STREAM_PORT'] %
localsettings.JS_SETTINGS['LIVE_STREAM_URL'],
localsettings.JS_SETTINGS['LIVE_STREAM_PORT'],
localsettings.JS_SETTINGS['LIVE_STREAM_MOUNT']),
'description': 'Description',
'title': now_playing_info
'description': now_playing_info['stream_description'],
'title': now_playing_info['current_song']
}), mimetype="application/json")
return None