mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Add setting to selectively hide library statistics cards on the homepage
This commit is contained in:
parent
8a989d71ca
commit
078f4babf5
5 changed files with 89 additions and 7 deletions
|
@ -1208,7 +1208,7 @@ class PmsConnect(object):
|
|||
'title': helpers.get_xml_attr(xml_head[0], 'title1'),
|
||||
'libraries_list': libraries_list
|
||||
}
|
||||
|
||||
|
||||
return output
|
||||
|
||||
"""
|
||||
|
@ -1270,13 +1270,15 @@ class PmsConnect(object):
|
|||
return output
|
||||
|
||||
"""
|
||||
Return processed and validated server statistics.
|
||||
Return processed and validated library statistics.
|
||||
|
||||
Output: array
|
||||
"""
|
||||
def get_library_stats(self):
|
||||
def get_library_stats(self, library_cards=''):
|
||||
server_libraries = self.get_server_children()
|
||||
|
||||
library_keys = library_cards.split(', ')
|
||||
|
||||
server_library_stats = []
|
||||
|
||||
if server_libraries['libraries_count'] != '0':
|
||||
|
@ -1285,7 +1287,10 @@ class PmsConnect(object):
|
|||
for library in libraries_list:
|
||||
library_type = library['type']
|
||||
section_key = library['key']
|
||||
library_list = self.get_library_children(library_type, section_key)
|
||||
if section_key in library_keys:
|
||||
library_list = self.get_library_children(library_type, section_key)
|
||||
else:
|
||||
continue
|
||||
|
||||
if library_list['library_count'] != '0':
|
||||
library_stats = {'title': library['title'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue