diff --git a/core/utils/live.py b/core/utils/live.py index d5c6116..40ea4f2 100644 --- a/core/utils/live.py +++ b/core/utils/live.py @@ -4,11 +4,13 @@ from bs4 import BeautifulSoup def _parseItem(soup, param): try: - return soup.find(text=param).findNext('td').contents[0] + match = soup.find(text=param) + if match is not None: + return match.findNext('td').contents[0] except Exception, ex: logging.getLogger('core').exception("Error parsing ice stream details: " + ex.message) - return "Unknown" + return "Some lovely musicd" def get_server_details(server, port, mount): diff --git a/dss/logsettings.py b/dss/logsettings.py index cf12068..d0c8a37 100644 --- a/dss/logsettings.py +++ b/dss/logsettings.py @@ -1,4 +1,5 @@ import os + if os.name == 'posix': LOG_FILE = '/tmp/dss.log' else: @@ -19,25 +20,25 @@ LOGGING = { 'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'simple' - }, + }, 'file': { 'level': 'DEBUG', 'class': 'logging.FileHandler', 'filename': LOG_FILE, 'formatter': 'simple' - }, }, + }, 'loggers': { 'spa': { - 'handlers': ['file'], + 'handlers': ['file', 'console'], 'level': 'DEBUG', 'propagate': True, - }, }, 'core': { - 'handlers': ['file'], + 'handlers': ['file', 'console'], 'level': 'DEBUG', 'propagate': True, - }, + }, } +} diff --git a/spa/api/v1/MixResource.py b/spa/api/v1/MixResource.py index 62bad75..252183e 100644 --- a/spa/api/v1/MixResource.py +++ b/spa/api/v1/MixResource.py @@ -74,7 +74,11 @@ class MixResource(BackboneCompatibleResource): bundle.data['item_url'] = 'mix/%s' % bundle.obj.id bundle.data['play_count'] = bundle.obj.plays.count() +<<<<<<< HEAD bundle.data['download_count'] = bundle.obj.download.count() +======= + bundle.data['download_count'] = bundle.obj.downloads.count() +>>>>>>> e98519493cf82785f319ad65cafa3c8eb09250b3 bundle.data['like_count'] = bundle.obj.likes.count() bundle.data['mode'] = 'mix' bundle.data['tooltip'] = render_to_string('inc/player_tooltip.html', {'item': bundle.obj}) diff --git a/templates/inc/_MixItemInsert.html b/templates/inc/_MixItemInsert.html index 58ae954..7a8a916 100644 --- a/templates/inc/_MixItemInsert.html +++ b/templates/inc/_MixItemInsert.html @@ -1,8 +1,13 @@ {% load thumbnail %}
-
- mix-logo +
+
+ mix-logo +
+
+
+ Hello Sailor