mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Add manual trigger for recently added notifications from the info page
This commit is contained in:
parent
4a16ee6865
commit
45f002a797
3 changed files with 54 additions and 8 deletions
|
@ -3591,6 +3591,26 @@ class WebInterface(object):
|
|||
logger.warn(u"Unable to retrieve data for get_item_children.")
|
||||
return serve_template(templatename="info_children_list.html", data=None, title="Children List")
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
@requireAuth()
|
||||
def send_manual_on_created(self, rating_key='', **kwargs):
|
||||
if rating_key:
|
||||
pms_connect = pmsconnect.PmsConnect()
|
||||
metadata = pms_connect.get_metadata_details(rating_key=rating_key)
|
||||
data = {'timeline_data': metadata, 'notify_action': 'on_created', 'manual_trigger': True}
|
||||
|
||||
if metadata['media_type'] not in ('movie', 'episode', 'track'):
|
||||
children = pms_connect.get_item_children(rating_key=rating_key)
|
||||
child_keys = [child['rating_key'] for child in children['children_list'] if child['rating_key']]
|
||||
data['child_keys'] = child_keys
|
||||
|
||||
plexpy.NOTIFY_QUEUE.put(data)
|
||||
return {'result': 'success', 'message': 'Notification queued.'}
|
||||
|
||||
else:
|
||||
return {'result': 'error', 'message': 'Notification failed.'}
|
||||
|
||||
@cherrypy.expose
|
||||
@requireAuth()
|
||||
def pms_image_proxy(self, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue