test delay + update template

This commit is contained in:
bkfox
2015-11-05 20:54:12 +01:00
parent 758bcb30a2
commit f5b5718231
3 changed files with 19 additions and 7 deletions

View File

@ -87,9 +87,9 @@ class Command (BaseCommand):
@staticmethod
def __render_stream_in_radio (stream):
if stream.time_start and stream.time_end:
data = '({{{}h-{}h}}, {})'.format(
stream.time_start.hour,
stream.time_end.hour,
data = '({{{}-{}}}, {})'.format(
stream.time_start.strftime('%Hh%M'),
stream.time_end.strftime('%Hh%M'),
stream.program.get_slug_name()
)
else:
@ -97,7 +97,7 @@ class Command (BaseCommand):
if stream.delay:
data = 'delay({}., {})'.format(
stream.delay.strftime('%s'),
3600*stream.delay.hour+60*stream.delay.minute+stream.delay.second,
data
)
return data

View File

@ -6,7 +6,7 @@ def ensure (key, default):
# dict of values to set (do not forget to escape chars)
ensure('AIRCOX_LIQUIDSOAP_CONFIG', {
ensure('AIRCOX_LIQUIDSOAP_SET', {
'log.file.path': '"/tmp/liquidsoap.log"',
'server.socket': 'true',
'server.socket.path': '"/tmp/liquidsoap.sock"'