mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -07:00
Add time range to most concurrent stat
* Reorder cards
This commit is contained in:
parent
cb7ba7fdde
commit
53876e8f0d
2 changed files with 4 additions and 2 deletions
|
@ -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.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue