mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Add hidden setting to override server name
This commit is contained in:
parent
000656be00
commit
b7da2dedf3
7 changed files with 13 additions and 8 deletions
|
@ -58,6 +58,7 @@ _CONFIG_DEFINITIONS = {
|
|||
'PMS_LOGS_FOLDER': (str, 'PMS', ''),
|
||||
'PMS_LOGS_LINE_CAP': (int, 'PMS', 1000),
|
||||
'PMS_NAME': (str, 'PMS', ''),
|
||||
'PMS_NAME_OVERRIDE': (str, 'PMS', ''),
|
||||
'PMS_PORT': (int, 'PMS', 32400),
|
||||
'PMS_TOKEN': (str, 'PMS', ''),
|
||||
'PMS_SSL': (int, 'PMS', 0),
|
||||
|
|
|
@ -1773,3 +1773,7 @@ def check_watched(media_type, view_offset, duration, marker_credits_first=None,
|
|||
return view_offset >= min(threshold, marker_credits_first)
|
||||
else:
|
||||
return view_offset >= threshold
|
||||
|
||||
|
||||
def pms_name():
|
||||
return plexpy.CONFIG.PMS_NAME_OVERRIDE or plexpy.CONFIG.PMS_NAME
|
||||
|
|
|
@ -599,7 +599,7 @@ class Newsletter(object):
|
|||
base_url = helpers.get_plexpy_url() + '/newsletter/'
|
||||
|
||||
parameters = {
|
||||
'server_name': plexpy.CONFIG.PMS_NAME,
|
||||
'server_name': helpers.pms_name(),
|
||||
'start_date': self.start_date.format(date_format),
|
||||
'end_date': self.end_date.format(date_format),
|
||||
'current_year': self.start_date.year,
|
||||
|
|
|
@ -951,7 +951,7 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m
|
|||
'tautulli_remote': plexpy.CONFIG.GIT_REMOTE,
|
||||
'tautulli_branch': plexpy.CONFIG.GIT_BRANCH,
|
||||
'tautulli_commit': plexpy.CURRENT_VERSION,
|
||||
'server_name': plexpy.CONFIG.PMS_NAME,
|
||||
'server_name': helpers.pms_name(),
|
||||
'server_ip': plexpy.CONFIG.PMS_IP,
|
||||
'server_port': plexpy.CONFIG.PMS_PORT,
|
||||
'server_url': plexpy.CONFIG.PMS_URL,
|
||||
|
@ -1246,7 +1246,7 @@ def build_server_notify_params(notify_action=None, **kwargs):
|
|||
'tautulli_remote': plexpy.CONFIG.GIT_REMOTE,
|
||||
'tautulli_branch': plexpy.CONFIG.GIT_BRANCH,
|
||||
'tautulli_commit': plexpy.CURRENT_VERSION,
|
||||
'server_name': plexpy.CONFIG.PMS_NAME,
|
||||
'server_name': helpers.pms_name(),
|
||||
'server_ip': plexpy.CONFIG.PMS_IP,
|
||||
'server_port': plexpy.CONFIG.PMS_PORT,
|
||||
'server_url': plexpy.CONFIG.PMS_URL,
|
||||
|
|
|
@ -2850,7 +2850,7 @@ class PLEXMOBILEAPP(Notifier):
|
|||
'data': {
|
||||
'provider': {
|
||||
'identifier': plexpy.CONFIG.PMS_IDENTIFIER,
|
||||
'title': plexpy.CONFIG.PMS_NAME
|
||||
'title': helpers.pms_name()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ def get_server_resources(return_presence=False, return_server=False, return_info
|
|||
if not return_presence and not return_info:
|
||||
logger.info("Tautulli PlexTV :: Requesting resources for server...")
|
||||
|
||||
server = {'pms_name': plexpy.CONFIG.PMS_NAME,
|
||||
server = {'pms_name': helpers.pms_name(),
|
||||
'pms_version': plexpy.CONFIG.PMS_VERSION,
|
||||
'pms_platform': plexpy.CONFIG.PMS_PLATFORM,
|
||||
'pms_ip': plexpy.CONFIG.PMS_IP,
|
||||
|
|
|
@ -127,7 +127,7 @@ def serve_template(templatename, **kwargs):
|
|||
error_handler=mako_error_handler)
|
||||
|
||||
http_root = plexpy.HTTP_ROOT
|
||||
server_name = plexpy.CONFIG.PMS_NAME
|
||||
server_name = helpers.pms_name()
|
||||
cache_param = '?' + (plexpy.CURRENT_VERSION or common.RELEASE)
|
||||
|
||||
_session = get_session_info()
|
||||
|
@ -213,7 +213,7 @@ class WebInterface(object):
|
|||
"pms_is_remote": plexpy.CONFIG.PMS_IS_REMOTE,
|
||||
"pms_ssl": plexpy.CONFIG.PMS_SSL,
|
||||
"pms_is_cloud": plexpy.CONFIG.PMS_IS_CLOUD,
|
||||
"pms_name": plexpy.CONFIG.PMS_NAME,
|
||||
"pms_name": helpers.pms_name(),
|
||||
"logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ class WebInterface(object):
|
|||
config = {
|
||||
"home_sections": plexpy.CONFIG.HOME_SECTIONS,
|
||||
"home_refresh_interval": plexpy.CONFIG.HOME_REFRESH_INTERVAL,
|
||||
"pms_name": plexpy.CONFIG.PMS_NAME,
|
||||
"pms_name": helpers.pms_name(),
|
||||
"pms_is_cloud": plexpy.CONFIG.PMS_IS_CLOUD,
|
||||
"update_show_changelog": plexpy.CONFIG.UPDATE_SHOW_CHANGELOG,
|
||||
"first_run_complete": plexpy.CONFIG.FIRST_RUN_COMPLETE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue