diff --git a/gui/slick/interfaces/default/config_notifications.tmpl b/gui/slick/interfaces/default/config_notifications.tmpl index 4d3dd470..71c319fa 100644 --- a/gui/slick/interfaces/default/config_notifications.tmpl +++ b/gui/slick/interfaces/default/config_notifications.tmpl @@ -1537,6 +1537,10 @@   configure per show notifications here. +
Click below to test.
diff --git a/gui/slick/js/configNotifications.js b/gui/slick/js/configNotifications.js index 1f1c8f2a..8b8bb969 100644 --- a/gui/slick/js/configNotifications.js +++ b/gui/slick/js/configNotifications.js @@ -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') ) { diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index b3789b19..8064bc19 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -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')