Add setting to selectively hide watch statistic cards on homepage

This commit is contained in:
Jonathan Wong 2015-09-18 18:52:46 -07:00
parent 6eec4d1ca6
commit 20056718db
5 changed files with 91 additions and 19 deletions

View file

@ -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