Add time range to most concurrent stat
* Reorder cards
This commit is contained in:
@@ -109,10 +109,10 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||
<option id="card-popular_movies" value="popular_movies">Most Popular Movie</option>
|
||||
<option id="card-top_music" value="top_music">Most Listened Music</option>
|
||||
<option id="card-popular_music" value="popular_music">Most Popular Music</option>
|
||||
<option id="card-last_watched" value="last_watched">Last Watched</option>
|
||||
<option id="card-top_users" value="top_users">Most Active User</option>
|
||||
<option id="card-top_platforms" value="top_platforms">Most Active Platform</option>
|
||||
<option id="card-most_concurrent" value="most_concurrent">Most Concurrent Streams</option>
|
||||
<option id="card-last_watched" value="last_watched">Last Watched</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -592,7 +592,9 @@ class DataFactory(object):
|
||||
elif stat == 'most_concurrent':
|
||||
try:
|
||||
query = 'SELECT started, stopped ' \
|
||||
'FROM session_history '
|
||||
'FROM session_history ' \
|
||||
'WHERE datetime(stopped, "unixepoch", "localtime") ' \
|
||||
'>= datetime("now", "-%s days", "localtime") ' % time_range
|
||||
result = monitor_db.select(query)
|
||||
except:
|
||||
logger.warn("Unable to execute database query for get_home_stats: most_concurrent.")
|
||||
|
Reference in New Issue
Block a user