diff --git a/sickbeard/gh_api.py b/sickbeard/gh_api.py index 42904f5e..ac7e4f31 100644 --- a/sickbeard/gh_api.py +++ b/sickbeard/gh_api.py @@ -90,11 +90,6 @@ class GitHub(object): def branches(self): access_API = self._access_API( - ['repos', self.github_repo_user, self.github_repo, 'branches']) - return access_API - - def checkout(self, branch): - access_API = self._access_API( - ['repos', self.github_repo_user, self.github_repo, 'branches']) - return access_API - + ['repos', self.github_repo_user, self.github_repo, 'branches'], + params={'per_page': 100}) + return access_API \ No newline at end of file diff --git a/sickbeard/versionChecker.py b/sickbeard/versionChecker.py index c9ee46cd..1bd4da29 100644 --- a/sickbeard/versionChecker.py +++ b/sickbeard/versionChecker.py @@ -528,9 +528,9 @@ class GitUpdateManager(UpdateManager): return False def list_remote_branches(self): - branches, err, exit_status = self._run_git(self._git_path, 'branch -r') # @UnusedVariable + branches, err, exit_status = self._run_git(self._git_path, 'ls-remote --heads origin') # @UnusedVariable if exit_status == 0 and branches: - return branches.strip().replace('origin/', '').split() + return re.findall('\S+\Wrefs/heads/(.*)', branches) return [] class SourceUpdateManager(UpdateManager):