Return bool for Twitter and Facebook notify

This commit is contained in:
JonnyWong16
2016-07-31 15:25:08 -07:00
parent aba39d06bf
commit 9b067a437c

View File

@@ -1396,9 +1396,9 @@ class TwitterNotifier(object):
poster_url = metadata.get('poster_url','') poster_url = metadata.get('poster_url','')
if self.incl_subject: if self.incl_subject:
self._send_tweet(subject + '\r\n' + message, attachment=poster_url) return self._send_tweet(subject + '\r\n' + message, attachment=poster_url)
else: else:
self._send_tweet(message, attachment=poster_url) return self._send_tweet(message, attachment=poster_url)
def test_notify(self): def test_notify(self):
return self._send_tweet("This is a test notification from PlexPy at " + helpers.now()) return self._send_tweet("This is a test notification from PlexPy at " + helpers.now())
@@ -2442,9 +2442,9 @@ class FacebookNotifier(object):
attachment['description'] = subtitle attachment['description'] = subtitle
if self.incl_subject: if self.incl_subject:
self._post_facebook(subject + '\r\n' + message, attachment=attachment) return self._post_facebook(subject + '\r\n' + message, attachment=attachment)
else: else:
self._post_facebook(message, attachment=attachment) return self._post_facebook(message, attachment=attachment)
def test_notify(self): def test_notify(self):
return self._post_facebook(u"PlexPy Notifiers :: This is a test notification from PlexPy at " + helpers.now()) return self._post_facebook(u"PlexPy Notifiers :: This is a test notification from PlexPy at " + helpers.now())