summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ogcp/views.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index a583dfa..6b3815c 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -2512,6 +2512,12 @@ def action_oglive():
oglive_list = r.json()['oglive']
most_used_live = max(oglives_set, key=lambda l: len(oglives_set[l]))
+ default_idx = int(r.json()['default'])
+ default_oglive_dir = oglive_list[default_idx].get('directory')
+
+ if most_used_live == OG_CLIENT_DEFAULT_LIVEDIR:
+ most_used_live = default_oglive_dir
+
available_oglives = []
for oglive in oglive_list:
live_entry = (oglive.get('directory'), oglive.get('directory'))
@@ -2520,8 +2526,6 @@ def action_oglive():
else:
available_oglives.append(live_entry)
- default_idx = int(r.json()['default'])
- default_oglive_dir = oglive_list[default_idx].get('directory')
available_oglives.append(('default', f'ogLive ({default_oglive_dir})'))
form.oglive.choices = available_oglives