monitor: playlist update and fetch to/from file only if changed; fix bug logs filter in on_air

This commit is contained in:
bkfox
2016-08-22 20:55:30 +02:00
parent ae8162643e
commit 4a7517c109
7 changed files with 66 additions and 45 deletions

View File

@ -407,7 +407,6 @@ class ProgramPage(Publication):
diffs = programs.Diffusion.objects \
.filter(end__gte = now, program = self.program) \
.order_by('start').prefetch_related('page')
print(diffs)
return self.diffs_to_page(diffs)
@property

View File

@ -884,6 +884,7 @@ class SectionLogsList(SectionItem):
Supports: Log/Track, Diffusion
"""
from aircox.cms.models import DiffusionPage
print(log, type(log))
if type(log) == programs.Diffusion:
return DiffusionPage.as_item(log)
return ListItem(

View File

@ -344,7 +344,7 @@ Player.prototype = {
var data = JSON.parse(req.responseText)
if(data.type == 'track')
data = {
title: '♫' + (data.artist ? data.artist + ' — ' : '') +
title: '♫ ' + (data.artist ? data.artist + ' — ' : '') +
data.title,
url: ''
}