mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 00:06:07 -07:00
Start day of the week changeable
Option in general settings to change the start day of the week to Monday (instead of the default of Sunday). This is only relevant for the Graph : Play by day of week. Feathub issue : http://feathub.com/JonnyWong16/plexpy/+15
This commit is contained in:
parent
3742f33d08
commit
cb2a38addc
4 changed files with 16 additions and 3 deletions
|
@ -117,6 +117,12 @@
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block">Set your preferred time format. <a href="javascript:void(0)" data-target="#dateTimeOptionsModal" data-toggle="modal">Click here</a> to see the parameter list.</p>
|
<p class="help-block">Set your preferred time format. <a href="javascript:void(0)" data-target="#dateTimeOptionsModal" data-toggle="modal">Click here</a> to see the parameter list.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" id="week_start" name="week_start" value="1" ${config['week_start']}> Week starting on Monday
|
||||||
|
</label>
|
||||||
|
<p class="help-block">Default is Sunday. This is only relevant for the Play by day of week graph.</p>
|
||||||
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" id="group_history_tables" name="group_history_tables" value="1" ${config['group_history_tables']}> Group Table and Watch Statistics History
|
<input type="checkbox" id="group_history_tables" name="group_history_tables" value="1" ${config['group_history_tables']}> Group Table and Watch Statistics History
|
||||||
|
|
|
@ -565,6 +565,7 @@ _CONFIG_DEFINITIONS = {
|
||||||
'UPDATE_LABELS': (int, 'General', 1),
|
'UPDATE_LABELS': (int, 'General', 1),
|
||||||
'VERIFY_SSL_CERT': (bool_int, 'Advanced', 1),
|
'VERIFY_SSL_CERT': (bool_int, 'Advanced', 1),
|
||||||
'VIDEO_LOGGING_ENABLE': (int, 'Monitoring', 1),
|
'VIDEO_LOGGING_ENABLE': (int, 'Monitoring', 1),
|
||||||
|
'WEEK_START': (int, 'General', 0),
|
||||||
'XBMC_ENABLED': (int, 'XBMC', 0),
|
'XBMC_ENABLED': (int, 'XBMC', 0),
|
||||||
'XBMC_HOST': (str, 'XBMC', ''),
|
'XBMC_HOST': (str, 'XBMC', ''),
|
||||||
'XBMC_PASSWORD': (str, 'XBMC', ''),
|
'XBMC_PASSWORD': (str, 'XBMC', ''),
|
||||||
|
|
|
@ -169,6 +169,11 @@ class Graphs(object):
|
||||||
logger.warn(u"PlexPy Graphs :: Unable to execute database query for get_total_plays_per_dayofweek: %s." % e)
|
logger.warn(u"PlexPy Graphs :: Unable to execute database query for get_total_plays_per_dayofweek: %s." % e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
week_start = plexpy.CONFIG.WEEK_START
|
||||||
|
if (week_start == 1):
|
||||||
|
days_list = ['Monday', 'Tuesday', 'Wednesday',
|
||||||
|
'Thursday', 'Friday', 'Saturday', 'Sunday']
|
||||||
|
else:
|
||||||
days_list = ['Sunday', 'Monday', 'Tuesday', 'Wednesday',
|
days_list = ['Sunday', 'Monday', 'Tuesday', 'Wednesday',
|
||||||
'Thursday', 'Friday', 'Saturday']
|
'Thursday', 'Friday', 'Saturday']
|
||||||
|
|
||||||
|
|
|
@ -2618,7 +2618,8 @@ class WebInterface(object):
|
||||||
"git_token": plexpy.CONFIG.GIT_TOKEN,
|
"git_token": plexpy.CONFIG.GIT_TOKEN,
|
||||||
"imgur_client_id": plexpy.CONFIG.IMGUR_CLIENT_ID,
|
"imgur_client_id": plexpy.CONFIG.IMGUR_CLIENT_ID,
|
||||||
"cache_images": checked(plexpy.CONFIG.CACHE_IMAGES),
|
"cache_images": checked(plexpy.CONFIG.CACHE_IMAGES),
|
||||||
"pms_version": plexpy.CONFIG.PMS_VERSION
|
"pms_version": plexpy.CONFIG.PMS_VERSION,
|
||||||
|
"week_start": checked(plexpy.CONFIG.WEEK_START)
|
||||||
}
|
}
|
||||||
|
|
||||||
return serve_template(templatename="settings.html", title="Settings", config=config, kwargs=kwargs)
|
return serve_template(templatename="settings.html", title="Settings", config=config, kwargs=kwargs)
|
||||||
|
@ -2632,7 +2633,7 @@ class WebInterface(object):
|
||||||
checked_configs = [
|
checked_configs = [
|
||||||
"launch_browser", "enable_https", "https_create_cert", "api_enabled", "freeze_db", "check_github",
|
"launch_browser", "enable_https", "https_create_cert", "api_enabled", "freeze_db", "check_github",
|
||||||
"grouping_global_history", "grouping_user_history", "grouping_charts", "group_history_tables",
|
"grouping_global_history", "grouping_user_history", "grouping_charts", "group_history_tables",
|
||||||
"pms_use_bif", "pms_ssl", "pms_is_remote", "home_stats_type",
|
"pms_use_bif", "pms_ssl", "pms_is_remote", "home_stats_type", "week_start",
|
||||||
"movie_notify_enable", "tv_notify_enable", "music_notify_enable", "monitoring_use_websocket",
|
"movie_notify_enable", "tv_notify_enable", "music_notify_enable", "monitoring_use_websocket",
|
||||||
"refresh_libraries_on_startup", "refresh_users_on_startup",
|
"refresh_libraries_on_startup", "refresh_users_on_startup",
|
||||||
"ip_logging_enable", "movie_logging_enable", "tv_logging_enable", "music_logging_enable",
|
"ip_logging_enable", "movie_logging_enable", "tv_logging_enable", "music_logging_enable",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue