mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -07:00
Add config settings for on_created
* Note: on_created is recently added
This commit is contained in:
parent
968132099e
commit
32cf1ada8b
4 changed files with 76 additions and 17 deletions
|
@ -57,6 +57,13 @@ from plexpy import helpers
|
|||
</label>
|
||||
<p class="help-block">Trigger notification when a media item triggers the defined buffer threshold.</p>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" data-size="small" data-id="${data['id']}" data-config-name="${data['config_prefix']}_on_created" ${helpers.checked(data['on_created'])} class="toggle-switches">
|
||||
Notify on recently added
|
||||
</label>
|
||||
<p class="help-block">Trigger notification when a media item is added to the Plex Media Server.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -81,6 +88,7 @@ from plexpy import helpers
|
|||
console.log('success');
|
||||
}
|
||||
});
|
||||
$('.toggle-notification-triggers-modal[data-id=' + configToggle + ']').addClass('active');
|
||||
} else {
|
||||
var data = {};
|
||||
data[$(this).data('config-name')] = 0;
|
||||
|
@ -92,6 +100,9 @@ from plexpy import helpers
|
|||
console.log('success');
|
||||
}
|
||||
});
|
||||
if (!($('.toggle-switches').is(":checked"))) {
|
||||
$('.toggle-notification-triggers-modal[data-id=' + configToggle + ']').removeClass('active');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -515,7 +515,7 @@ available_notification_agents = notifiers.available_notification_agents()
|
|||
<a href="#notify-text-tags-modal" data-toggle="modal">here</a> to view usage information.
|
||||
</p>
|
||||
<br/>
|
||||
<ul id="accordion" class="accordion list-unstyled">
|
||||
<ul id="accordion-session" class="accordion list-unstyled">
|
||||
<li>
|
||||
<div class="link"><i class="fa fa-play"></i>Playback Start<i class="fa fa-chevron-down"></i></div>
|
||||
<ul class="submenu">
|
||||
|
@ -619,6 +619,25 @@ available_notification_agents = notifiers.available_notification_agents()
|
|||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul id="accordion-timeline" class="accordion list-unstyled">
|
||||
<li>
|
||||
<div class="link"><i class="fa fa-download"></i>Recently Added<i class="fa fa-chevron-down"></i></div>
|
||||
<ul class="submenu">
|
||||
<li>
|
||||
<div class="form-group">
|
||||
<label for="notify_on_created_subject_text">Subject Line</label>
|
||||
<input class="form-control" type="text" id="notify_on_created_subject_text" name="notify_on_created_subject_text" value="${config['notify_on_created_subject_text']}" data-parsley-trigger="change" required>
|
||||
<p class="help-block">Set a custom subject line.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notify_on_created_body_text">Message Body</label>
|
||||
<input class="form-control" type="text" id="notify_on_created_body_text" name="notify_on_created_body_text" value="${config['notify_on_created_body_text']}" data-parsley-trigger="change" required>
|
||||
<p class="help-block">Set a custom body.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p><input type="button" class="btn btn-bright save-button" value="Save" data-success="Changes saved successfully"></p>
|
||||
</div>
|
||||
|
@ -635,7 +654,7 @@ available_notification_agents = notifiers.available_notification_agents()
|
|||
% for agent in available_notification_agents:
|
||||
<li>
|
||||
<span>
|
||||
% if agent['on_play'] or agent['on_stop'] or agent['on_pause'] or agent['on_resume'] or agent['on_buffer'] or agent['on_watched']:
|
||||
% if agent['on_play'] or agent['on_stop'] or agent['on_pause'] or agent['on_resume'] or agent['on_buffer'] or agent['on_watched'] or agent['on_created']:
|
||||
<a href="javascript:void(0)" data-target="#notification-triggers-modal" data-id="${agent['id']}" class="toggle-notification-triggers-modal toggle-left active" data-toggle="modal"><i class="fa fa-lg fa-bell"></i></a>
|
||||
% else:
|
||||
<a href="javascript:void(0)" data-target="#notification-triggers-modal" data-id="${agent['id']}" class="toggle-notification-triggers-modal toggle-left" data-toggle="modal"><i class="fa fa-lg fa-bell"></i></a>
|
||||
|
@ -1292,7 +1311,8 @@ $(document).ready(function() {
|
|||
}
|
||||
}
|
||||
|
||||
var accordion = new Accordion($('#accordion'), false);
|
||||
var accordion_session = new Accordion($('#accordion-session'), false);
|
||||
var accordion_timeline = new Accordion($('#accordion-timeline'), false);
|
||||
|
||||
var cards = "${config['home_stats_cards']}".split(/[\s,]+/);
|
||||
cards.forEach(function (item) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue