From b76a28dfa4b567c47db75483b2ba3f6e083613b8 Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt <ernesto@helsinki.at> Date: Tue, 18 Jan 2022 18:21:06 -0400 Subject: [PATCH] Remove unused json_timeslots_specials function --- program/views.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/program/views.py b/program/views.py index 751c7f35..f8e9204e 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 -- GitLab