diff --git a/program/views.py b/program/views.py index 751c7f35e714a5f6d432479f702665f419cb6ea5..f8e9204ee874684f41248cc6398f28d661863461 100644 --- a/program/views.py +++ b/program/views.py @@ -147,32 +147,6 @@ def json_playout(request): content_type="application/json; charset=utf-8") -def json_timeslots_specials(request): - specials = {} - shows = get_cached_shows()['shows'] - for show in shows: - show['pv_id'] = -1 - if show['type'] == 's': - specials[show['id']] = show - - for ts in TimeSlot.objects.filter(end__gt=timezone.now(), - schedule__automation_id__in=specials.keys()).select_related('show'): - automation_id = ts.schedule.automation_id - start = ts.start.strftime('%Y-%m-%d_%H:%M:%S') - end = ts.end.strftime('%Y-%m-%d_%H:%M:%S') - if specials[automation_id]['pv_id'] != -1: - if specials[automation_id]['pv_start'] < start: - continue - - specials[automation_id]['pv_id'] = ts.show.id - specials[automation_id]['pv_name'] = ts.show.name - specials[automation_id]['pv_start'] = start - specials[automation_id]['pv_end'] = end - - return HttpResponse(json.dumps(specials, ensure_ascii=False).encode('utf8'), - content_type="application/json; charset=utf-8") - - def int_or_none(key, kwargs): return int(kwargs[key]) if key in kwargs else None