Merge branch 'master' of github.com:fergalmoran/dss

Conflicts:
	spa/api/v1/MixResource.py
This commit is contained in:
fergalmoran
2012-10-27 18:29:24 +01:00
4 changed files with 22 additions and 10 deletions

View File

@@ -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):

View File

@@ -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,
},
},
}
}

View File

@@ -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})

View File

@@ -1,8 +1,13 @@
{% load thumbnail %}
<div class="row well">
<div class="span2" id="image-span">
<div id="image">
<img alt="mix-logo" class="mix-image-image" src="<%= item.mix_image %>"/>
<div class="row">
<div id="image">
<img alt="mix-logo" class="mix-image-image" src="<%= item.mix_image %>"/>
</div>
</div>
<div class="row">
<span>Hello Sailor</span>
</div>
</div>
<div class="span10" style="padding-left: 32px">