mirror of
https://github.com/Kunsi/scheduled-plugin-pretalx-broadcast-tools.git
synced 2024-11-24 11:01:05 +00:00
service: isort && black
This commit is contained in:
parent
e2d154226f
commit
60cd315f0b
1 changed files with 13 additions and 5 deletions
16
service
16
service
|
@ -140,15 +140,23 @@ def main():
|
||||||
for day in raw_schedule["conference"]["days"]:
|
for day in raw_schedule["conference"]["days"]:
|
||||||
for room in day["rooms"].values():
|
for room in day["rooms"].values():
|
||||||
for talk in room:
|
for talk in room:
|
||||||
start = event_tz.localize(datetime.strptime(
|
start = event_tz.localize(
|
||||||
|
datetime.strptime(
|
||||||
talk["date"][:19], "%Y-%m-%dT%H:%M:%S"
|
talk["date"][:19], "%Y-%m-%dT%H:%M:%S"
|
||||||
))
|
)
|
||||||
|
)
|
||||||
d_h, d_m = talk["duration"].split(":")
|
d_h, d_m = talk["duration"].split(":")
|
||||||
end = start + timedelta(hours=int(d_h), minutes=int(d_m))
|
end = start + timedelta(hours=int(d_h), minutes=int(d_m))
|
||||||
|
|
||||||
talk["start_ts"] = int(timegm(start.timetuple()) - start.utcoffset().total_seconds())
|
talk["start_ts"] = int(
|
||||||
|
timegm(start.timetuple())
|
||||||
|
- start.utcoffset().total_seconds()
|
||||||
|
)
|
||||||
talk["start_str"] = talk["start"]
|
talk["start_str"] = talk["start"]
|
||||||
talk["end_ts"] = int(timegm(end.timetuple()) - end.utcoffset().total_seconds())
|
talk["end_ts"] = int(
|
||||||
|
timegm(end.timetuple())
|
||||||
|
- end.utcoffset().total_seconds()
|
||||||
|
)
|
||||||
talk["locale"] = talk["language"]
|
talk["locale"] = talk["language"]
|
||||||
|
|
||||||
track = None
|
track = None
|
||||||
|
|
Loading…
Reference in a new issue