mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Add new graphs for watches by day of week and hour of day.
Clean up some graph styling
This commit is contained in:
parent
71a2e75fef
commit
0224c709b0
6 changed files with 257 additions and 3 deletions
|
@ -738,3 +738,27 @@ class WebInterface(object):
|
|||
return json.dumps(result)
|
||||
else:
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
def get_plays_by_dayofweek(self, time_range='30', **kwargs):
|
||||
|
||||
plex_watch = plexwatch.PlexWatch()
|
||||
result = plex_watch.get_total_plays_per_dayofweek(time_range)
|
||||
|
||||
if result:
|
||||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps(result)
|
||||
else:
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
||||
@cherrypy.expose
|
||||
def get_plays_by_hourofday(self, time_range='30', **kwargs):
|
||||
|
||||
plex_watch = plexwatch.PlexWatch()
|
||||
result = plex_watch.get_total_plays_per_hourofday(time_range)
|
||||
|
||||
if result:
|
||||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps(result)
|
||||
else:
|
||||
logger.warn('Unable to retrieve data.')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue