From b22763b37d7780140698725a0ed2632e2eb7a7c2 Mon Sep 17 00:00:00 2001 From: Ruud Burger Date: Thu, 26 Apr 2012 10:57:34 +0300 Subject: [PATCH 1/4] Use master branch to update master.. --- couchpotato/core/_base/updater/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/_base/updater/main.py b/couchpotato/core/_base/updater/main.py index f518222..9b4d8ca 100644 --- a/couchpotato/core/_base/updater/main.py +++ b/couchpotato/core/_base/updater/main.py @@ -78,7 +78,7 @@ class BaseUpdater(Plugin): repo_user = 'RuudBurger' repo_name = 'CouchPotatoServer' - branch = 'develop' + branch = 'master' version = None update_failed = False From d1c2869f2cb4b3fac555cce732e92bb8fec97363 Mon Sep 17 00:00:00 2001 From: Ken Garland Date: Thu, 26 Apr 2012 23:30:33 -0300 Subject: [PATCH 2/4] Removed RUN_AS for group, don't assume the default group is the same as the username. Specifying group is not needed anyways. --- init/ubuntu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/ubuntu b/init/ubuntu index 8abc9e7..d6af148 100644 --- a/init/ubuntu +++ b/init/ubuntu @@ -45,7 +45,7 @@ case "$1" in start) echo "Starting $DESC" rm -rf $PID_PATH || return 1 - install -d --mode=0755 -o $RUN_AS -g $RUN_AS $PID_PATH || return 1 + install -d --mode=0755 -o $RUN_AS $PID_PATH || return 1 start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE --exec $DAEMON -- $DAEMON_OPTS ;; stop) From ba8fef3c87484e4898a196ef9b25c69be68f9825 Mon Sep 17 00:00:00 2001 From: Riccardo Sirchia Date: Sun, 6 May 2012 18:02:51 +0200 Subject: [PATCH 3/4] Added support for direct messages in twitter notifications --- couchpotato/core/notifications/twitter/__init__.py | 7 +++++++ couchpotato/core/notifications/twitter/main.py | 16 ++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/notifications/twitter/__init__.py b/couchpotato/core/notifications/twitter/__init__.py index 266a287..5910b0a 100644 --- a/couchpotato/core/notifications/twitter/__init__.py +++ b/couchpotato/core/notifications/twitter/__init__.py @@ -38,6 +38,13 @@ config = [{ 'advanced': True, 'description': 'Also send message when movie is snatched.', }, + { + 'name': 'direct_message', + 'default': 0, + 'type': 'bool', + 'advanced': True, + 'description': 'Use direct messages for the notifications (Also applies to the mentioned users).', + }, ], } ], diff --git a/couchpotato/core/notifications/twitter/main.py b/couchpotato/core/notifications/twitter/main.py index 700f7fa..dcac067 100644 --- a/couchpotato/core/notifications/twitter/main.py +++ b/couchpotato/core/notifications/twitter/main.py @@ -36,12 +36,24 @@ class Twitter(Notification): api = Api(self.consumer_key, self.consumer_secret, self.conf('access_token_key'), self.conf('access_token_secret')) + direct_message = self.conf('direct_message') + direct_message_users = self.conf('screen_name') + mention = self.conf('mention') if mention: - message = '%s @%s' % (message, mention.lstrip('@')) + if direct_message: + direct_message_users = '%s %s' % (direct_message_users, mention) + direct_message_users = direct_message_users.replace('@',' ') + direct_message_users = direct_message_users.replace(',',' ') + else: + message = '%s @%s' % (message, mention.lstrip('@')) try: - api.PostUpdate('[%s] %s' % (self.default_title, message)) + if direct_message: + for user in direct_message_users.split(): + api.PostDirectMessage(user, '[%s] %s' % (self.default_title, message)) + else: + api.PostUpdate('[%s] %s' % (self.default_title, message)) except Exception, e: log.error('Error sending tweet: %s' % e) return False From d4a5483fa034d960bb7160a076ee11507e3bdc78 Mon Sep 17 00:00:00 2001 From: Ruud Burger Date: Thu, 26 Apr 2012 10:57:34 +0300 Subject: [PATCH 4/4] Use master branch to update master.. --- couchpotato/core/_base/updater/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/_base/updater/main.py b/couchpotato/core/_base/updater/main.py index c12c4b9..1774923 100644 --- a/couchpotato/core/_base/updater/main.py +++ b/couchpotato/core/_base/updater/main.py @@ -80,7 +80,7 @@ class BaseUpdater(Plugin): repo_user = 'RuudBurger' repo_name = 'CouchPotatoServer' - branch = 'develop' + branch = 'master' version = None update_failed = False