mirror of
https://github.com/Kunsi/scheduled-plugin-pretalx-broadcast-tools.git
synced 2025-01-04 22:39:12 +00:00
use OrderedDict for schedule, because order of rooms is important
This commit is contained in:
parent
0206873096
commit
f841594488
1 changed files with 4 additions and 2 deletions
6
service
6
service
|
@ -8,6 +8,8 @@ from datetime import datetime, timedelta
|
|||
|
||||
import pytz
|
||||
from requests import get
|
||||
from json import JSONDecoder
|
||||
from collections import OrderedDict
|
||||
|
||||
from hosted import config, node
|
||||
|
||||
|
@ -146,7 +148,7 @@ def main():
|
|||
# info json blob atleast once, we have all the information
|
||||
# we need.
|
||||
else:
|
||||
schedule = r.json()
|
||||
schedule = JSONDecoder(object_pairs_hook=OrderedDict).decode(r.text)
|
||||
tracks = {}
|
||||
for talk in schedule["talks"]:
|
||||
talk["start_str"] = (
|
||||
|
@ -177,7 +179,7 @@ def main():
|
|||
except Exception as e:
|
||||
log("getting schedule.json failed: {}".format(repr(e)))
|
||||
else:
|
||||
raw_schedule = r.json()["schedule"]
|
||||
raw_schedule = JSONDecoder(object_pairs_hook=OrderedDict).decode(r.text)["schedule"]
|
||||
schedule = {
|
||||
"tracks": raw_schedule["conference"]["tracks"],
|
||||
"talks": [],
|
||||
|
|
Loading…
Reference in a new issue