Skip to content
Snippets Groups Projects
Verified Commit fdfa77f5 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

fix: expose showName instead of title

parent 78c8a389
No related branches found
No related tags found
No related merge requests found
......@@ -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,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment