From cc98412f9a5554c5c05ff90276febcbc158caf60 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 10 Feb 2016 17:01:40 +0100 Subject: [PATCH] Change remote origin url to organization --- couchpotato/core/_base/updater/main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/couchpotato/core/_base/updater/main.py b/couchpotato/core/_base/updater/main.py index 66b632a..6435a15 100644 --- a/couchpotato/core/_base/updater/main.py +++ b/couchpotato/core/_base/updater/main.py @@ -188,9 +188,19 @@ class BaseUpdater(Plugin): class GitUpdater(BaseUpdater): + old_repo = 'RuudBurger/CouchPotatoServer' + new_repo = 'CouchPotato/CouchPotatoServer' + def __init__(self, git_command): self.repo = LocalRepository(Env.get('app_dir'), command = git_command) + remote_name = 'origin' + remote = self.repo.getRemoteByName(remote_name) + if self.old_repo in remote.url: + log.info('Changing repo to new github organization: %s -> %s', (self.old_repo, self.new_repo)) + new_url = remote.url.replace(self.old_repo, self.new_repo) + self.repo._executeGitCommandAssertSuccess("remote set-url %s %s" % (remote_name, new_url)) + def doUpdate(self): try: