mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2024-11-21 21:11:02 +00:00
add more information to the json outputs
This commit is contained in:
parent
433f316719
commit
8f8f8a90e2
1 changed files with 14 additions and 1 deletions
|
@ -65,7 +65,7 @@ class BroadcastToolsEventInfoView(View):
|
||||||
return JsonResponse(
|
return JsonResponse(
|
||||||
{
|
{
|
||||||
"color": color,
|
"color": color,
|
||||||
"name": str(self.request.event.name),
|
"name": self.request.event.name.localize(self.request.event.locale),
|
||||||
"no_talk": str(
|
"no_talk": str(
|
||||||
self.request.event.settings.broadcast_tools_lower_thirds_no_talk_info
|
self.request.event.settings.broadcast_tools_lower_thirds_no_talk_info
|
||||||
),
|
),
|
||||||
|
@ -77,6 +77,10 @@ class BroadcastToolsEventInfoView(View):
|
||||||
else False,
|
else False,
|
||||||
},
|
},
|
||||||
"slug": self.request.event.slug,
|
"slug": self.request.event.slug,
|
||||||
|
"start": self.request.event.date_from.isoformat(),
|
||||||
|
"end": self.request.event.date_to.isoformat(),
|
||||||
|
"timezone": str(self.request.event.tz),
|
||||||
|
"locale": self.request.event.locale,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -130,9 +134,15 @@ class BroadcastToolsScheduleView(EventPermissionRequired, ScheduleMixin, View):
|
||||||
"start": talk.start.astimezone(
|
"start": talk.start.astimezone(
|
||||||
schedule.event.tz
|
schedule.event.tz
|
||||||
).isoformat(),
|
).isoformat(),
|
||||||
|
"start_ts": int(talk.start.timestamp()),
|
||||||
"end": (talk.start + dt.timedelta(minutes=talk.duration))
|
"end": (talk.start + dt.timedelta(minutes=talk.duration))
|
||||||
.astimezone(schedule.event.tz)
|
.astimezone(schedule.event.tz)
|
||||||
.isoformat(),
|
.isoformat(),
|
||||||
|
"end_ts": int(
|
||||||
|
(
|
||||||
|
talk.start + dt.timedelta(minutes=talk.duration)
|
||||||
|
).timestamp()
|
||||||
|
),
|
||||||
"slug": talk.frab_slug,
|
"slug": talk.frab_slug,
|
||||||
"title": talk.submission.title,
|
"title": talk.submission.title,
|
||||||
"persons": [
|
"persons": [
|
||||||
|
@ -148,6 +158,9 @@ class BroadcastToolsScheduleView(EventPermissionRequired, ScheduleMixin, View):
|
||||||
"room": room["name"].localize(schedule.event.locale),
|
"room": room["name"].localize(schedule.event.locale),
|
||||||
"infoline": infoline.format(**placeholders(schedule, talk)),
|
"infoline": infoline.format(**placeholders(schedule, talk)),
|
||||||
"image_url": talk.submission.image_url,
|
"image_url": talk.submission.image_url,
|
||||||
|
"locale": talk.submission.content_locale,
|
||||||
|
"do_not_record": talk.submission.do_not_record,
|
||||||
|
"abstract": talk.submission.abstract,
|
||||||
"urls": {
|
"urls": {
|
||||||
"feedback": "{}{}".format(
|
"feedback": "{}{}".format(
|
||||||
schedule.event.custom_domain or settings.SITE_URL,
|
schedule.event.custom_domain or settings.SITE_URL,
|
||||||
|
|
Loading…
Reference in a new issue