mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 05:13:21 -07:00
Return the name of the server with the notification.
Remove some unnecessary includes. Fix validation on logging_ignore_interval which wouldn't allow anything less than 30
This commit is contained in:
parent
06558a7437
commit
0916370a9d
4 changed files with 57 additions and 15 deletions
|
@ -866,6 +866,34 @@ class PmsConnect(object):
|
|||
|
||||
return server_identity
|
||||
|
||||
"""
|
||||
Return a specified server preference.
|
||||
|
||||
Parameters required: pref { name of preference }
|
||||
|
||||
Output: string
|
||||
"""
|
||||
def get_server_pref(self, pref=None):
|
||||
if pref:
|
||||
prefs = self.get_server_prefs(output_format='xml')
|
||||
|
||||
try:
|
||||
xml_head = prefs.getElementsByTagName('Setting')
|
||||
except:
|
||||
logger.warn("Unable to parse XML for get_local_server_name.")
|
||||
return ''
|
||||
|
||||
pref_value = 'None'
|
||||
for a in xml_head:
|
||||
if helpers.get_xml_attr(a, 'id') == pref:
|
||||
pref_value = helpers.get_xml_attr(a, 'value')
|
||||
break
|
||||
|
||||
return pref_value
|
||||
else:
|
||||
logger.debug(u"Server preferences queried but no parameter received.")
|
||||
return None
|
||||
|
||||
"""
|
||||
Return image data as array.
|
||||
Array contains the image content type and image binary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue