feat(api): don't use hyperlinked serializers (#1984)

This commit is contained in:
Jonas L 2022-07-27 09:54:57 +02:00 committed by GitHub
parent f137be09a1
commit e97b06496a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 305 additions and 582 deletions

View file

@ -39,15 +39,15 @@ def get_schedule(api_client: ApiClient):
item["starts_at"] = isoparse(item["starts_at"])
item["ends_at"] = isoparse(item["ends_at"])
show_instance = api_client.get_show_instance(item["instance_id"]).json()
show = api_client.get_show(show_instance["show_id"]).json()
show_instance = api_client.get_show_instance(item["instance"]).json()
show = api_client.get_show(show_instance["show"]).json()
if item["file"]:
file = api_client.get_file(item["file_id"]).json()
file = api_client.get_file(item["file"]).json()
events.update(generate_file_events(item, file, show))
elif item["stream"]:
webstream = api_client.get_webstream(item["stream_id"]).json()
webstream = api_client.get_webstream(item["stream"]).json()
events.update(generate_webstream_events(item, webstream, show))
return {"media": events}