Commit c06014fc authored by fred's avatar fred

player: display currently playing track/artist

parent 7768d028
......@@ -147,6 +147,7 @@ INSTALLED_APPS = (
'ckeditor',
'emissions',
'newsletter',
'nonstop',
'combo.data',
'combo.public',
)
......
......@@ -29,6 +29,7 @@ from emissions.models import Category, Emission, Episode, Diffusion, SoundFile,
from emissions.utils import whatsonair, period_program
from newsletter.forms import SubscribeForm
from nonstop.utils import get_current_nonstop_track
from . import utils
......@@ -540,6 +541,7 @@ def onair(request):
d['nonstop'] = {
'title': d['nonstop'].title,
}
d.update(get_current_nonstop_track())
if d.get('current_slot'):
del d['current_slot']
return d
......
......@@ -1501,3 +1501,7 @@ h3.episode-subtitle {
font-style: normal;
font-weight: bold;
}
.nonstop-track-title, .nonstop-track-artist {
font-size: 80%;
}
......@@ -207,6 +207,14 @@ $(function() {
}
} else if (onair.data.nonstop) {
onairContainer = $('<span>' + onair.data.nonstop.title + '</span>');
if (onair.data.track_title) {
onairContainer = onairContainer.add('<span> - </span>');
onairContainer = onairContainer.add($('<span class="nonstop-track-title">' + onair.data.track_title + '</span>'));
if (onair.data.track_artist) {
onairContainer = onairContainer.add('<span> </span>');
onairContainer = onairContainer.add($('<span class="nonstop-track-artist">(' + onair.data.track_artist + ')</span>'));
}
}
}
else {
onairContainer = $('<span>Unknown (Probably Non-Stop)</span>');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment