mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Respect group history setting in graphs
This commit is contained in:
parent
07092e8aa5
commit
836c4293d6
4 changed files with 46 additions and 16 deletions
|
@ -1799,7 +1799,7 @@ class WebInterface(object):
|
|||
@cherrypy.tools.json_out()
|
||||
@requireAuth()
|
||||
@addtoapi()
|
||||
def get_plays_by_date(self, time_range='30', user_id=None, y_axis='plays', **kwargs):
|
||||
def get_plays_by_date(self, time_range='30', user_id=None, y_axis='plays', grouping=None, **kwargs):
|
||||
""" Get graph data by date.
|
||||
|
||||
```
|
||||
|
@ -1823,8 +1823,13 @@ class WebInterface(object):
|
|||
}
|
||||
```
|
||||
"""
|
||||
if grouping and str(grouping).isdigit():
|
||||
grouping = int(grouping)
|
||||
elif grouping == 'false':
|
||||
grouping = 0
|
||||
|
||||
graph = graphs.Graphs()
|
||||
result = graph.get_total_plays_per_day(time_range=time_range, user_id=user_id, y_axis=y_axis)
|
||||
result = graph.get_total_plays_per_day(time_range=time_range, user_id=user_id, y_axis=y_axis, grouping=grouping)
|
||||
|
||||
if result:
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue