From 5cc1855b730076e84110f419f9176cb98b7c0136 Mon Sep 17 00:00:00 2001
From: Adam
Date: Sun, 16 Aug 2015 11:23:56 +0800
Subject: [PATCH] Change notifier code to follow quotation standards
---
sickbeard/notifiers/__init__.py | 2 +-
sickbeard/notifiers/emailnotify.py | 42 ++++----
sickbeard/notifiers/growl.py | 14 +--
sickbeard/notifiers/nma.py | 10 +-
sickbeard/notifiers/nmj.py | 72 ++++++-------
sickbeard/notifiers/nmjv2.py | 52 +++++-----
sickbeard/notifiers/prowl.py | 28 +++---
sickbeard/notifiers/pushalot.py | 30 +++---
sickbeard/notifiers/pushbullet.py | 2 +-
sickbeard/notifiers/pytivo.py | 20 ++--
sickbeard/notifiers/synoindex.py | 16 +--
sickbeard/notifiers/synologynotifier.py | 14 +--
sickbeard/notifiers/trakt.py | 14 +--
sickbeard/notifiers/tweet.py | 20 ++--
sickbeard/notifiers/xbmc.py | 128 ++++++++++++------------
15 files changed, 232 insertions(+), 232 deletions(-)
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(
"SickGear Notification - Snatched
\nShow: " + 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(
"SickGear Notification - Downloaded
\nShow: " + 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(
"SickGear Notification - Subtitle Downloaded
\nShow: " + 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