mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 00:32:58 -07:00
Remove media type toggles from recently added notifications
This commit is contained in:
parent
8bbc6a6611
commit
bc52ac3559
1 changed files with 11 additions and 17 deletions
|
@ -211,23 +211,17 @@ def notify(stream_data=None, notify_action=None):
|
||||||
|
|
||||||
def notify_timeline(timeline_data=None, notify_action=None):
|
def notify_timeline(timeline_data=None, notify_action=None):
|
||||||
if timeline_data and notify_action:
|
if timeline_data and notify_action:
|
||||||
if (timeline_data['media_type'] == 'movie' and plexpy.CONFIG.MOVIE_NOTIFY_ENABLE) \
|
for agent in notifiers.available_notification_agents():
|
||||||
or ((timeline_data['media_type'] == 'show' or timeline_data['media_type'] == 'episode') \
|
if agent['on_created'] and notify_action == 'created':
|
||||||
and plexpy.CONFIG.TV_NOTIFY_ENABLE) \
|
# Build and send notification
|
||||||
or ((timeline_data['media_type'] == 'artist' or timeline_data['media_type'] == 'track') \
|
notify_strings = build_notify_text(timeline=timeline_data, state=notify_action)
|
||||||
and plexpy.CONFIG.MUSIC_NOTIFY_ENABLE):
|
notifiers.send_notification(config_id=agent['id'],
|
||||||
|
subject=notify_strings[0],
|
||||||
for agent in notifiers.available_notification_agents():
|
body=notify_strings[1],
|
||||||
if agent['on_created'] and notify_action == 'created':
|
notify_action=notify_action,
|
||||||
# Build and send notification
|
script_args=notify_strings[2])
|
||||||
notify_strings = build_notify_text(timeline=timeline_data, state=notify_action)
|
# Set the notification state in the db
|
||||||
notifiers.send_notification(config_id=agent['id'],
|
set_notify_state(session=timeline_data, state=notify_action, agent_info=agent)
|
||||||
subject=notify_strings[0],
|
|
||||||
body=notify_strings[1],
|
|
||||||
notify_action=notify_action,
|
|
||||||
script_args=notify_strings[2])
|
|
||||||
# Set the notification state in the db
|
|
||||||
set_notify_state(session=timeline_data, state=notify_action, agent_info=agent)
|
|
||||||
|
|
||||||
elif not timeline_data and notify_action:
|
elif not timeline_data and notify_action:
|
||||||
for agent in notifiers.available_notification_agents():
|
for agent in notifiers.available_notification_agents():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue