diff --git a/sickbeard/notifiers/__init__.py b/sickbeard/notifiers/__init__.py index b35be15a..83094dfd 100644 --- a/sickbeard/notifiers/__init__.py +++ b/sickbeard/notifiers/__init__.py @@ -103,6 +103,6 @@ def notify_snatch(ep_name): n.notify_snatch(ep_name) -def notify_git_update(new_version=""): +def notify_git_update(new_version=''): for n in notifiers: n.notify_git_update(new_version) diff --git a/sickbeard/notifiers/emailnotify.py b/sickbeard/notifiers/emailnotify.py index c68b57e6..ce0b215f 100644 --- a/sickbeard/notifiers/emailnotify.py +++ b/sickbeard/notifiers/emailnotify.py @@ -43,7 +43,7 @@ class EmailNotifier: msg['To'] = to return self._sendmail(host, port, smtp_from, use_tls, user, pwd, [to], msg, True) - def notify_snatch(self, ep_name, title="Snatched:"): + def notify_snatch(self, ep_name, title='Snatched:'): """ Send a notification that an episode was snatched @@ -62,8 +62,8 @@ class EmailNotifier: msg = MIMEMultipart('alternative') msg.attach(MIMEText( "
Show: " + re.search( - "(.+?) -.+", ep_name).group(1) + "
\nEpisode: " + re.search( - ".+ - (.+?-.+) -.+", ep_name).group( + '(.+?) -.+', ep_name).group(1) + '
\nEpisode: ' + re.search( + '.+ - (.+?-.+) -.+', ep_name).group( 1) + "
\n\n", 'html')) except: @@ -74,11 +74,11 @@ class EmailNotifier: msg['To'] = ','.join(to) if self._sendmail(sickbeard.EMAIL_HOST, sickbeard.EMAIL_PORT, sickbeard.EMAIL_FROM, sickbeard.EMAIL_TLS, sickbeard.EMAIL_USER, sickbeard.EMAIL_PASSWORD, to, msg): - logger.log("Snatch notification sent to [%s] for '%s'" % (to, ep_name), logger.DEBUG) + logger.log('Snatch notification sent to [%s] for "%s"' % (to, ep_name), logger.DEBUG) else: - logger.log("Snatch notification ERROR: %s" % self.last_err, logger.ERROR) + logger.log('Snatch notification ERROR: %s' % self.last_err, logger.ERROR) - def notify_download(self, ep_name, title="Completed:"): + def notify_download(self, ep_name, title='Completed:'): """ Send a notification that an episode was downloaded @@ -97,8 +97,8 @@ class EmailNotifier: msg = MIMEMultipart('alternative') msg.attach(MIMEText( "Show: " + re.search( - "(.+?) -.+", ep_name).group(1) + "
\nEpisode: " + re.search( - ".+ - (.+?-.+) -.+", ep_name).group( + '(.+?) -.+', ep_name).group(1) + '
\nEpisode: ' + re.search( + '.+ - (.+?-.+) -.+', ep_name).group( 1) + "
\n\n", 'html')) except: @@ -109,11 +109,11 @@ class EmailNotifier: msg['To'] = ','.join(to) if self._sendmail(sickbeard.EMAIL_HOST, sickbeard.EMAIL_PORT, sickbeard.EMAIL_FROM, sickbeard.EMAIL_TLS, sickbeard.EMAIL_USER, sickbeard.EMAIL_PASSWORD, to, msg): - logger.log("Download notification sent to [%s] for '%s'" % (to, ep_name), logger.DEBUG) + logger.log('Download notification sent to [%s] for "%s"' % (to, ep_name), logger.DEBUG) else: - logger.log("Download notification ERROR: %s" % self.last_err, logger.ERROR) + logger.log('Download notification ERROR: %s' % self.last_err, logger.ERROR) - def notify_subtitle_download(self, ep_name, lang, title="Downloaded subtitle:"): + def notify_subtitle_download(self, ep_name, lang, title='Downloaded subtitle:'): """ Send a notification that an subtitle was downloaded @@ -132,24 +132,24 @@ class EmailNotifier: msg = MIMEMultipart('alternative') msg.attach(MIMEText( "Show: " + re.search( - "(.+?) -.+", ep_name).group(1) + "
\nEpisode: " + re.search( - ".+ - (.+?-.+) -.+", ep_name).group( - 1) + "
\nLanguage: " + lang + "
\n\n", + '(.+?) -.+', ep_name).group(1) + '\nEpisode: ' + re.search( + '.+ - (.+?-.+) -.+', ep_name).group( + 1) + '
\nLanguage: ' + lang + "
\n\n