From 63dbe9e52258aea6b8837b2cfa4cbc3cade1eaf8 Mon Sep 17 00:00:00 2001 From: dkboy Date: Sun, 17 Aug 2014 14:42:07 +1200 Subject: [PATCH 1/3] Update bitsoup.py they've reorganized columns --- sickbeard/providers/bitsoup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sickbeard/providers/bitsoup.py b/sickbeard/providers/bitsoup.py index d4f40289..aaf50a92 100644 --- a/sickbeard/providers/bitsoup.py +++ b/sickbeard/providers/bitsoup.py @@ -197,8 +197,8 @@ class BitSoupProvider(generic.TorrentProvider): try: title = link.getText() id = int(id) - seeders = int(cells[9].getText()) - leechers = int(cells[10].getText()) + seeders = int(cells[10].getText()) + leechers = int(cells[11].getText()) except (AttributeError, TypeError): continue From 48b79937b89b6e3d0fa64cbda1d350e7ab797912 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 15 Aug 2014 14:54:22 +0800 Subject: [PATCH 2/3] Possible fix for updating when using zips from github --- sickbeard/__init__.py | 6 +++++- sickbeard/versionChecker.py | 15 ++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index c10d478f..f114bdc4 100755 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -444,7 +444,7 @@ __INITIALIZED__ = False def initialize(consoleLogging=True): with INIT_LOCK: - global BRANCH, ACTUAL_LOG_DIR, LOG_DIR, WEB_PORT, WEB_LOG, ENCRYPTION_VERSION, WEB_ROOT, WEB_USERNAME, WEB_PASSWORD, WEB_HOST, WEB_IPV6, USE_API, API_KEY, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, \ + global BRANCH, CUR_COMMIT_HASH, ACTUAL_LOG_DIR, LOG_DIR, WEB_PORT, WEB_LOG, ENCRYPTION_VERSION, WEB_ROOT, WEB_USERNAME, WEB_PASSWORD, WEB_HOST, WEB_IPV6, USE_API, API_KEY, ENABLE_HTTPS, HTTPS_CERT, HTTPS_KEY, \ HANDLE_REVERSE_PROXY, USE_NZBS, USE_TORRENTS, NZB_METHOD, NZB_DIR, DOWNLOAD_PROPERS, CHECK_PROPERS_INTERVAL, ALLOW_HIGH_PRIORITY, TORRENT_METHOD, \ SAB_USERNAME, SAB_PASSWORD, SAB_APIKEY, SAB_CATEGORY, SAB_HOST, \ NZBGET_USERNAME, NZBGET_PASSWORD, NZBGET_CATEGORY, NZBGET_PRIORITY, NZBGET_HOST, NZBGET_USE_HTTPS, backlogSearchScheduler, \ @@ -514,6 +514,9 @@ def initialize(consoleLogging=True): # branch BRANCH = check_setting_str(CFG, 'General', 'branch', '') + # current commit hash + CUR_COMMIT_HASH = check_setting_str(CFG, 'General', 'cur_commit_hash', '') + ACTUAL_CACHE_DIR = check_setting_str(CFG, 'General', 'cache_dir', 'cache') # fix bad configs due to buggy code if ACTUAL_CACHE_DIR == 'None': @@ -1306,6 +1309,7 @@ def save_config(): # For passwords you must include the word `password` in the item_name and add `helpers.encrypt(ITEM_NAME, ENCRYPTION_VERSION)` in save_config() new_config['General'] = {} new_config['General']['branch'] = BRANCH + new_config['General']['cur_commit_hash'] = CUR_COMMIT_HASH new_config['General']['config_version'] = CONFIG_VERSION new_config['General']['encryption_version'] = int(ENCRYPTION_VERSION) new_config['General']['log_dir'] = ACTUAL_LOG_DIR if ACTUAL_LOG_DIR else 'Logs' diff --git a/sickbeard/versionChecker.py b/sickbeard/versionChecker.py index 99bdf126..164be84e 100644 --- a/sickbeard/versionChecker.py +++ b/sickbeard/versionChecker.py @@ -566,17 +566,9 @@ class SourceUpdateManager(UpdateManager): if sickbeard.BRANCH == '': self.branch = self._find_installed_branch() - self._cur_commit_hash = None + self._cur_commit_hash = sickbeard.CUR_COMMIT_HASH self._newest_commit_hash = None self._num_commits_behind = 0 - - def _find_installed_version(self): - installed_path = os.path.dirname(os.path.normpath(os.path.abspath(__file__))) - self._cur_commit_hash = self.hash_dir(installed_path) - - if not self._cur_commit_hash: - self._cur_commit_hash = None - sickbeard.CUR_COMMIT_HASH = str(self._cur_commit_hash) def _find_installed_branch(self): if sickbeard.BRANCH == "": @@ -590,8 +582,6 @@ class SourceUpdateManager(UpdateManager): logger.log(u"Branch checkout: " + self._find_installed_branch() + "->" + self.branch, logger.DEBUG) return True - self._find_installed_version() - try: self._check_github_for_update() except Exception, e: @@ -746,6 +736,9 @@ class SourceUpdateManager(UpdateManager): if os.path.isfile(new_path): os.remove(new_path) os.renames(old_path, new_path) + + sickbeard.CUR_COMMIT_HASH = self._newest_commit_hash + except Exception, e: logger.log(u"Error while trying to update: " + ex(e), logger.ERROR) logger.log(u"Traceback: " + traceback.format_exc(), logger.DEBUG) From 49a8df0cacddb8e69d3333c0472a7e6994085069 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 17 Aug 2014 12:28:55 +0800 Subject: [PATCH 3/3] Fix for ABD shows --- sickbeard/name_parser/parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sickbeard/name_parser/parser.py b/sickbeard/name_parser/parser.py index 735f2ad4..e1d42f04 100644 --- a/sickbeard/name_parser/parser.py +++ b/sickbeard/name_parser/parser.py @@ -266,14 +266,14 @@ class NameParser(object): t = sickbeard.indexerApi(bestResult.show.indexer).indexer(**lINDEXER_API_PARMS) if bestResult.is_air_by_date: - epObj = t[bestResult.show.indexerid].airedOn(parse_result.air_date)[0] + epObj = t[bestResult.show.indexerid].airedOn(bestResult.air_date)[0] else: - epObj = t[bestResult.show.indexerid].airedOn(parse_result.sports_air_date)[0] + epObj = t[bestResult.show.indexerid].airedOn(bestResult.sports_air_date)[0] season_number = int(epObj["seasonnumber"]) episode_numbers = [int(epObj["episodenumber"])] except sickbeard.indexer_episodenotfound: - logger.log(u"Unable to find episode with date " + str(parse_result.air_date) + " for show " + bestResult.show.name + ", skipping", logger.WARNING) + logger.log(u"Unable to find episode with date " + str(bestResult.air_date) + " for show " + bestResult.show.name + ", skipping", logger.WARNING) episode_numbers = [] except sickbeard.indexer_error, e: logger.log(u"Unable to contact " + sickbeard.indexerApi(bestResult.show.indexer).name + ": " + ex(e), logger.WARNING)