From a8bcbc66c37fe4b0020bc6aab364bb6f3795b66d Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 27 Jul 2014 13:00:53 -0700 Subject: [PATCH] Fix for incorrectly displayed remote branch list when in advanced settings. --- sickbeard/gh_api.py | 11 +++-------- sickbeard/versionChecker.py | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) 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):