diff --git a/plexpy/config.py b/plexpy/config.py index e1b70d53..92bc4ee0 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -46,6 +46,7 @@ _CONFIG_DEFINITIONS = { 'PMS_IP': (str, 'PMS', '127.0.0.1'), 'PMS_IS_REMOTE': (int, 'PMS', 0), 'PMS_LOGS_FOLDER': (str, 'PMS', ''), + 'PMS_LOGS_LINE_CAP': (int, 'PMS', 1000), 'PMS_NAME': (unicode, 'PMS', ''), 'PMS_PORT': (int, 'PMS', 32400), 'PMS_TOKEN': (str, 'PMS', ''), diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 9084b00a..74af8d95 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -2287,7 +2287,7 @@ class WebInterface(object): @cherrypy.tools.json_out() @requireAuth(member_of("admin")) @addtoapi() - def get_plex_log(self, window=1000, **kwargs): + def get_plex_log(self, **kwargs): """ Get the PMS logs. ``` @@ -2309,6 +2309,7 @@ class WebInterface(object): ] ``` """ + window = int(kwargs.get('window', plexpy.CONFIG.PMS_LOGS_LINE_CAP)) log_lines = [] log_type = kwargs.get('log_type', 'server')