mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Rename server statistics to library statistics
This commit is contained in:
parent
d44bd2f35b
commit
389ce97d03
5 changed files with 24 additions and 25 deletions
|
@ -1121,11 +1121,10 @@ class PmsConnect(object):
|
|||
|
||||
Output: array
|
||||
"""
|
||||
def get_server_stats(self):
|
||||
server_info = self.get_servers_info()
|
||||
def get_library_stats(self):
|
||||
server_libraries = self.get_server_children()
|
||||
|
||||
server_stats = []
|
||||
server_library_stats = []
|
||||
|
||||
if server_libraries['libraries_count'] != '0':
|
||||
libraries_list = server_libraries['libraries_list']
|
||||
|
@ -1152,14 +1151,14 @@ class PmsConnect(object):
|
|||
if library_type == 'artist':
|
||||
album_list = self.get_library_children(library_type='album', section_key=section_key)
|
||||
album_stats = {'album_count': album_list['library_count'],
|
||||
'album_count_type': 'All Albums'
|
||||
}
|
||||
'album_count_type': 'All Albums'
|
||||
}
|
||||
library_stats.update(album_stats)
|
||||
|
||||
server_stats.append({'type': library_type,
|
||||
'rows': library_stats})
|
||||
server_library_stats.append({'type': library_type,
|
||||
'rows': library_stats})
|
||||
|
||||
return server_stats
|
||||
return server_library_stats
|
||||
|
||||
"""
|
||||
Return image data as array.
|
||||
|
|
|
@ -128,11 +128,11 @@ class WebInterface(object):
|
|||
return serve_template(templatename="home_stats.html", title="Stats", data=stats_data)
|
||||
|
||||
@cherrypy.expose
|
||||
def server_stats(self, **kwargs):
|
||||
def library_stats(self, **kwargs):
|
||||
pms_connect = pmsconnect.PmsConnect()
|
||||
stats_data = pms_connect.get_server_stats()
|
||||
stats_data = pms_connect.get_library_stats()
|
||||
|
||||
return serve_template(templatename="server_stats.html", title="Server Stats", data=stats_data)
|
||||
return serve_template(templatename="library_stats.html", title="Library Stats", data=stats_data)
|
||||
|
||||
@cherrypy.expose
|
||||
def history(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue