mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 15:12:23 -05:00
Merge pull request #1174 from CoRpO/develop
fix for SiCKRAGETV/sickrage-issues#347
This commit is contained in:
commit
4ac31a7159
@ -1609,6 +1609,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>
|
||||
|
@ -493,6 +493,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') ) {
|
||||
|
@ -948,6 +948,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