mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Add setting to selectively hide watch statistic cards on homepage
This commit is contained in:
parent
6eec4d1ca6
commit
20056718db
5 changed files with 91 additions and 19 deletions
|
@ -85,6 +85,7 @@ _CONFIG_DEFINITIONS = {
|
|||
'HOME_STATS_LENGTH': (int, 'General', 30),
|
||||
'HOME_STATS_TYPE': (int, 'General', 0),
|
||||
'HOME_STATS_COUNT': (int, 'General', 5),
|
||||
'HOME_STATS_CARDS': (str, 'General', 'top_tv, popular_tv, top_movies, popular_movies, top_music, popular_music, top_users, top_platforms, last_watched'),
|
||||
'HTTPS_CERT': (str, 'General', ''),
|
||||
'HTTPS_KEY': (str, 'General', ''),
|
||||
'HTTP_HOST': (str, 'General', '0.0.0.0'),
|
||||
|
|
|
@ -472,6 +472,7 @@ class WebInterface(object):
|
|||
"home_stats_length": plexpy.CONFIG.HOME_STATS_LENGTH,
|
||||
"home_stats_type": checked(plexpy.CONFIG.HOME_STATS_TYPE),
|
||||
"home_stats_count": plexpy.CONFIG.HOME_STATS_COUNT,
|
||||
"home_stats_cards": plexpy.CONFIG.HOME_STATS_CARDS,
|
||||
"buffer_threshold": plexpy.CONFIG.BUFFER_THRESHOLD,
|
||||
"buffer_wait": plexpy.CONFIG.BUFFER_WAIT
|
||||
}
|
||||
|
@ -524,6 +525,10 @@ class WebInterface(object):
|
|||
if kwargs['pms_ip'] != plexpy.CONFIG.PMS_IP:
|
||||
refresh_users = True
|
||||
|
||||
if 'home_stats_cards' in kwargs:
|
||||
if kwargs['home_stats_cards'] != 'watch_statistics':
|
||||
kwargs['home_stats_cards'] = ', '.join(kwargs['home_stats_cards'])
|
||||
|
||||
plexpy.CONFIG.process_kwargs(kwargs)
|
||||
|
||||
# Write the config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue