summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index d22cc23..d6fc67c 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -2475,9 +2475,14 @@ def action_oglive():
oglive_list = r.json()['oglive']
+ most_used_live = max(oglives_set, key=lambda l: len(oglives_set[l]))
available_oglives = []
for oglive in oglive_list:
- available_oglives.append((oglive.get('directory'), oglive.get('directory')))
+ live_entry = (oglive.get('directory'), oglive.get('directory'))
+ if oglive.get('directory') == most_used_live:
+ available_oglives.insert(0, live_entry)
+ else:
+ available_oglives.append(live_entry)
default_idx = int(r.json()['default'])
default_oglive_dir = oglive_list[default_idx].get('directory')