From a86522a81086dbea5805d3dd42e9997e66264215 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 26 Oct 2012 22:02:17 +0200 Subject: [PATCH 1/2] Don't download next when the release isn't found in downloaded. fix #924 --- couchpotato/core/plugins/renamer/main.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/couchpotato/core/plugins/renamer/main.py b/couchpotato/core/plugins/renamer/main.py index 6487bedc..207af6b3 100644 --- a/couchpotato/core/plugins/renamer/main.py +++ b/couchpotato/core/plugins/renamer/main.py @@ -3,7 +3,8 @@ from couchpotato.api import addApiView from couchpotato.core.event import addEvent, fireEvent, fireEventAsync from couchpotato.core.helpers.encoding import toUnicode, ss from couchpotato.core.helpers.request import jsonified -from couchpotato.core.helpers.variable import getExt, mergeDicts, getTitle +from couchpotato.core.helpers.variable import getExt, mergeDicts, getTitle, \ + getImdb from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.core.settings.model import Library, File, Profile, Release @@ -521,7 +522,7 @@ class Renamer(Plugin): if rels: self.checking_snatched = True log.debug('Checking status snatched releases...') - # get queue and history (once) from SABnzbd + statuses = fireEvent('download.status', merge = True) if not statuses: log.debug('Download status functionality is not implemented for active downloaders.') @@ -548,7 +549,7 @@ class Renamer(Plugin): found = False for item in statuses: - if item['name'] == nzbname: + if item['name'] == nzbname or getImdb(item['name']) == movie_dict['library']['identifier']: timeleft = 'N/A' if item['timeleft'] == -1 else item['timeleft'] log.debug('Found %s: %s, time to go: %s', (item['name'], item['status'].upper(), timeleft)) @@ -572,11 +573,6 @@ class Renamer(Plugin): if not found: log.info('%s not found in downloaders', nzbname) - rel.status_id = ignored_status.get('id') - db.commit() - - if self.conf('next_on_failed'): - fireEvent('searcher.try_next_release', movie_id = rel.movie_id) except: log.error('Failed checking for release in downloader: %s', traceback.format_exc()) From 7420785eaf1060cf9786703f7471663d5153fa30 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 26 Oct 2012 22:14:48 +0200 Subject: [PATCH 2/2] Show branch on about page --- couchpotato/core/_base/updater/main.py | 2 +- couchpotato/static/scripts/page/about.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/_base/updater/main.py b/couchpotato/core/_base/updater/main.py index fabc4596..dab8077f 100644 --- a/couchpotato/core/_base/updater/main.py +++ b/couchpotato/core/_base/updater/main.py @@ -406,7 +406,7 @@ class DesktopUpdater(BaseUpdater): 'last_check': self.last_check, 'update_version': self.update_version, 'version': self.getVersion(), - 'branch': 'desktop_build', + 'branch': self.branch, } def check(self): diff --git a/couchpotato/static/scripts/page/about.js b/couchpotato/static/scripts/page/about.js index d155800f..ba451c84 100644 --- a/couchpotato/static/scripts/page/about.js +++ b/couchpotato/static/scripts/page/about.js @@ -117,7 +117,7 @@ var AboutSettingTab = new Class({ var self = this; var date = new Date(json.version.date * 1000); self.version_text.set('text', json.version.hash + (json.version.date ? ' ('+date.toLocaleString()+')' : '')); - self.updater_type.set('text', json.version.type); + self.updater_type.set('text', json.version.type + ', ' + json.branch); } });