diff --git a/html/ptg.html b/html/ptg.html
index 8098e99..b7201e2 100644
--- a/html/ptg.html
+++ b/html/ptg.html
@@ -27,12 +27,14 @@
Currently playing...
- {{#each now as |what room|}}
+ {{#each rooms as |room| }}
+ {{#if (lookup @root.now room) }}
{{room}} |
- {{#hashtag}}{{what}}{{/hashtag}} |
+ {{#hashtag}}{{lookup @root.now room}}{{/hashtag}} |
{{lookup @root.location room}} |
+ {{/if}}
{{else}}
Nothing yet | |
{{/each}}
@@ -41,15 +43,17 @@
Coming up next...
- {{#each next as |sessions room|}}
+ {{#each rooms as |room| }}
+ {{#if (lookup @root.next room) }}
{{room}} |
- {{#each sessions}}
- {{#hashtag}}{{this}}{{/hashtag}}
- {{/each}}
+ {{#each (lookup @root.next room) as |item|}}
+ {{#hashtag}}{{item}}{{/hashtag}}
+ {{/each}}
|
+ {{/if}}
{{else}}
Nothing yet | |
{{/each}}
diff --git a/ptgbot/db.py b/ptgbot/db.py
index 71331d2..25f3f80 100644
--- a/ptgbot/db.py
+++ b/ptgbot/db.py
@@ -91,5 +91,6 @@ class PTGDataBase():
self.data['ethercalc'] = self.ethercalc.load()
timestamp = datetime.datetime.now()
self.data['timestamp'] = '{:%Y-%m-%d %H:%M:%S}'.format(timestamp)
+ self.data['rooms'] = sorted(self.data['rooms'])
with open(self.filename, 'w') as fp:
json.dump(self.data, fp)