continue migration: make website working

This commit is contained in:
bkfox
2019-08-05 23:45:20 +02:00
parent 432467ec8d
commit 324cf2ef0f
54 changed files with 8658 additions and 115 deletions

View File

@ -15,6 +15,7 @@ from django.utils import timezone as tz
from . import settings
from .models import Port, Station, Sound
from .connector import Connector
from .utils import to_seconds
# FIXME liquidsoap does not manage timezones -- we have to convert
@ -297,9 +298,6 @@ class PlaylistSource(Source):
if not stream or (not stream.begin and not stream.delay):
return
def to_seconds(time):
return 3600 * time.hour + 60 * time.minute + time.second
return {
'begin': stream.begin.strftime('%Hh%M') if stream.begin else None,
'end': stream.end.strftime('%Hh%M') if stream.end else None,