mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Add scripts
This commit is contained in:
parent
ad365c7dd0
commit
9328b7e586
6 changed files with 293 additions and 145 deletions
|
@ -555,7 +555,7 @@ class WebInterface(object):
|
|||
|
||||
# Get new server URLs for SSL communications.
|
||||
plextv.get_real_pms_url()
|
||||
|
||||
|
||||
# Get new server friendly name
|
||||
pmsconnect.get_server_friendly_name()
|
||||
|
||||
|
@ -663,6 +663,7 @@ class WebInterface(object):
|
|||
@cherrypy.expose
|
||||
def test_notifier(self, config_id=None, subject='PlexPy', body='Test notification', **kwargs):
|
||||
cherrypy.response.headers['Cache-Control'] = "max-age=0,no-cache,no-store"
|
||||
print kwargs
|
||||
|
||||
if config_id.isdigit():
|
||||
agents = notifiers.available_notification_agents()
|
||||
|
@ -672,10 +673,10 @@ class WebInterface(object):
|
|||
break
|
||||
else:
|
||||
this_agent = None
|
||||
|
||||
|
||||
if this_agent:
|
||||
logger.debug("Sending test %s notification." % this_agent['name'])
|
||||
notifiers.send_notification(this_agent['id'], subject, body)
|
||||
notifiers.send_notification(this_agent['id'], subject, body, **kwargs)
|
||||
return "Notification sent."
|
||||
else:
|
||||
logger.debug("Unable to send test notification, invalid notification agent ID %s." % config_id)
|
||||
|
@ -683,7 +684,7 @@ class WebInterface(object):
|
|||
else:
|
||||
logger.debug("Unable to send test notification, no notification agent ID received.")
|
||||
return "No notification agent ID received."
|
||||
|
||||
|
||||
@cherrypy.expose
|
||||
def twitterStep1(self):
|
||||
cherrypy.response.headers['Cache-Control'] = "max-age=0,no-cache,no-store"
|
||||
|
@ -1340,12 +1341,12 @@ class WebInterface(object):
|
|||
plexpy.CONFIG.__setattr__('PMS_SSL', ssl)
|
||||
plexpy.CONFIG.__setattr__('PMS_IS_REMOTE', remote)
|
||||
plexpy.CONFIG.write()
|
||||
|
||||
|
||||
plextv.get_real_pms_url()
|
||||
|
||||
|
||||
pms_connect = pmsconnect.PmsConnect()
|
||||
request = pms_connect.get_local_server_identity()
|
||||
|
||||
|
||||
if request:
|
||||
cherrypy.response.headers['Content-type'] = 'application/xml'
|
||||
return request
|
||||
|
@ -1425,7 +1426,7 @@ class WebInterface(object):
|
|||
def testScripts(self, *args, **kwargs):
|
||||
''' Used for manual testing for now cba with adding buttion '''
|
||||
script = notifiers.Scripts()
|
||||
return script.test(*args)
|
||||
return script.test(*args, **kwargs)
|
||||
|
||||
@cherrypy.expose
|
||||
def delete_history_rows(self, row_id, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue