mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-06 03:18:01 -05:00
fix for sickragetv/sickrage-issues#347
Adds missing code for saving per show email notifications
This commit is contained in:
parent
8b84e4f4bc
commit
9aa28d18d2
@ -1537,6 +1537,10 @@
|
||||
<span class="component-title"> </span>
|
||||
<span class="component-desc">configure per show notifications here.</span>
|
||||
</label>
|
||||
<label>
|
||||
<span class="component-title"> </span>
|
||||
<input id="email_show_save" class="btn" type="button" value="Save for this show" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="testNotification" id="testEmail-result">Click below to test.</div>
|
||||
|
@ -466,6 +466,13 @@ $(document).ready(function(){
|
||||
// Load the per show notify lists everytime this page is loaded
|
||||
load_show_notify_lists();
|
||||
|
||||
$('#email_show_save').click(function() {
|
||||
$.post(sbRoot + "/home/saveShowNotifyList", { show: $('#email_show').val(), emails: $('#email_show_list').val()}, function (data) {
|
||||
// Reload the per show notify lists to reflect changes
|
||||
load_show_notify_lists();
|
||||
});
|
||||
});
|
||||
|
||||
// show instructions for plex when enabled
|
||||
$('#use_plex').click(function() {
|
||||
if ( $(this).is(':checked') ) {
|
||||
|
@ -941,6 +941,16 @@ class Home(WebRoot):
|
||||
return json.dumps(data)
|
||||
|
||||
|
||||
def saveShowNotifyList(self, show=None, emails=None):
|
||||
# self.set_header('Cache-Control', 'max-age=0,no-cache,no-store')
|
||||
|
||||
myDB = db.DBConnection()
|
||||
if myDB.action("UPDATE tv_shows SET notify_list = ? WHERE show_id = ?", [emails, show]):
|
||||
return 'OK'
|
||||
else:
|
||||
return 'ERROR: %s' % myDB.last_err
|
||||
|
||||
|
||||
def testEmail(self, host=None, port=None, smtp_from=None, use_tls=None, user=None, pwd=None, to=None):
|
||||
# self.set_header('Cache-Control', 'max-age=0,no-cache,no-store')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user