diff --git a/program/services.py b/program/services.py index df3a45f27591081083974005778f41fec15a44a4..1d01adbff6398f056dbdb256201350c9f9501aa9 100644 --- a/program/services.py +++ b/program/services.py @@ -100,7 +100,7 @@ class ScheduleEntry(TypedDict): is_virtual: bool show_id: int start: str - title: str + show_name: str class TimeslotEntry(TypedDict): @@ -113,16 +113,16 @@ class TimeslotEntry(TypedDict): schedule_id: int show_default_playlist_id: int | None show_id: int + show_name: str start: str - title: str class VirtualTimeslotEntry(TypedDict): end: str is_virtual: Literal[True] show_id: int + show_name: str start: str - title: str def create_timeslot(start: str, end: str, schedule: Schedule) -> TimeSlot: @@ -787,7 +787,7 @@ def make_schedule_entry(*, timeslot_entry: TimeslotEntry) -> ScheduleEntry: "show_id": timeslot_entry["show_id"], "is_virtual": timeslot_entry["is_virtual"], "start": timeslot_entry["start"], - "title": timeslot_entry["title"], + "show_name": timeslot_entry["show_name"], } @@ -808,8 +808,8 @@ def make_timeslot_entry(*, timeslot: TimeSlot) -> TimeslotEntry: "schedule_id": schedule.id, "show_default_playlist_id": show.default_playlist_id, "show_id": show.id, + "show_name": show.name, "start": timeslot.start.strftime("%Y-%m-%dT%H:%M:%S %z"), - "title": f"{show.name} {_('REP')}" if schedule.is_repetition else show.name, } @@ -820,8 +820,8 @@ def make_virtual_timeslot_entry(*, gap_start: datetime, gap_end: datetime) -> Vi "end": gap_end.strftime("%Y-%m-%dT%H:%M:%S %z"), "is_virtual": True, "show_id": RadioSettings.objects.first().fallback_show.id, + "show_name": RadioSettings.objects.first().fallback_default_pool, "start": gap_start.strftime("%Y-%m-%dT%H:%M:%S %z"), - "title": RadioSettings.objects.first().fallback_default_pool, }