From 96275adaff4c9e53578921aa5b7b7594c847edc3 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 21 Jun 2014 18:44:09 +0200 Subject: [PATCH 1/7] Use always search and ignore ETA. fix #3475 --- couchpotato/core/media/movie/searcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/media/movie/searcher.py b/couchpotato/core/media/movie/searcher.py index 0f4b4179..1053ec3d 100644 --- a/couchpotato/core/media/movie/searcher.py +++ b/couchpotato/core/media/movie/searcher.py @@ -220,7 +220,7 @@ class MovieSearcher(SearcherBase, MovieTypeBase): log.debug('Found %s releases for "%s", but ETA isn\'t correct yet.', (results_count, default_title)) # Try find a valid result and download it - if (force_download or not could_not_be_released) and fireEvent('release.try_download_result', results, movie, quality_custom, single = True): + if (force_download or not could_not_be_released or alway_search) and fireEvent('release.try_download_result', results, movie, quality_custom, single = True): ret = True # Remove releases that aren't found anymore From 443866ef048183ff0b166c29aa14a90ceeb9acba Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 21 Jun 2014 18:50:36 +0200 Subject: [PATCH 2/7] Use default title for search query. fix #3477 --- couchpotato/core/media/movie/library.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/couchpotato/core/media/movie/library.py b/couchpotato/core/media/movie/library.py index a6e29f32..28cb1b46 100644 --- a/couchpotato/core/media/movie/library.py +++ b/couchpotato/core/media/movie/library.py @@ -1,4 +1,5 @@ from couchpotato.core.event import addEvent +from couchpotato.core.helpers.variable import getTitle from couchpotato.core.logger import CPLog from couchpotato.core.media._base.library.base import LibraryBase @@ -17,7 +18,9 @@ class MovieLibraryPlugin(LibraryBase): if media.get('type') != 'movie': return + default_title = getTitle(media) titles = media['info'].get('titles', []) + titles.insert(0, default_title) # Add year identifier to titles if include_year: From 5a08fed0b621e6d692fac0dfbca3b4892ff8dad3 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 22 Jun 2014 15:53:43 +0200 Subject: [PATCH 3/7] Manage release_id not assigned. fix #3479 --- couchpotato/core/plugins/manage.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/manage.py b/couchpotato/core/plugins/manage.py index f0e0faf4..bec204b0 100644 --- a/couchpotato/core/plugins/manage.py +++ b/couchpotato/core/plugins/manage.py @@ -166,10 +166,9 @@ class Manage(Plugin): already_used = used_files.get(release_file) if already_used: + release_id = release['_id'] if already_used.get('last_edit', 0) < release.get('last_edit', 0) else already_used['_id'] if release_id not in deleted_releases: - release_id = release['_id'] if already_used.get('last_edit', 0) < release.get('last_edit', 0) else already_used['_id'] fireEvent('release.delete', release_id, single = True) - deleted_releases.append(release_id) break else: From 37214dd41351f34c71d740f491a6662d31918e80 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 22 Jun 2014 16:15:36 +0200 Subject: [PATCH 4/7] Put Pushover in config. close #3480 --- couchpotato/core/notifications/pushover.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/notifications/pushover.py b/couchpotato/core/notifications/pushover.py index ea4b00a3..75073962 100644 --- a/couchpotato/core/notifications/pushover.py +++ b/couchpotato/core/notifications/pushover.py @@ -13,7 +13,6 @@ autoload = 'Pushover' class Pushover(Notification): - app_token = 'YkxHMYDZp285L265L3IwH3LmzkTaCy' def notify(self, message = '', data = None, listener = None): if not data: data = {} @@ -22,7 +21,7 @@ class Pushover(Notification): api_data = { 'user': self.conf('user_key'), - 'token': self.app_token, + 'token': self.conf('api_token'), 'message': toUnicode(message), 'priority': self.conf('priority'), 'sound': self.conf('sound'), @@ -49,7 +48,7 @@ class Pushover(Notification): log.error('Pushover auth failed: %s', response.reason) return False else: - log.error('Pushover notification failed.') + log.error('Pushover notification failed: %s', request_status) return False @@ -70,6 +69,12 @@ config = [{ 'name': 'user_key', 'description': 'Register on pushover.net to get one.' }, + { + 'name': 'api_token', + 'description': 'Register on pushover.net to get one.', + 'hidden': True, + 'default': 'YkxHMYDZp285L265L3IwH3LmzkTaCy', + }, { 'name': 'priority', 'default': 0, From 964144996f1e18c674b75af35496ff0da4a6c4e1 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 22 Jun 2014 16:17:11 +0200 Subject: [PATCH 5/7] Advanced not hidden. --- couchpotato/core/notifications/pushover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/notifications/pushover.py b/couchpotato/core/notifications/pushover.py index 75073962..d9ef226c 100644 --- a/couchpotato/core/notifications/pushover.py +++ b/couchpotato/core/notifications/pushover.py @@ -72,7 +72,7 @@ config = [{ { 'name': 'api_token', 'description': 'Register on pushover.net to get one.', - 'hidden': True, + 'advanced': True, 'default': 'YkxHMYDZp285L265L3IwH3LmzkTaCy', }, { From 5617953d39018f25b0c8d6e48481333aef2aa622 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 22 Jun 2014 20:23:47 +0200 Subject: [PATCH 6/7] Mark as done missing. #3472 --- couchpotato/core/media/movie/_base/static/movie.actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/media/movie/_base/static/movie.actions.js b/couchpotato/core/media/movie/_base/static/movie.actions.js index b3878fd5..ff71f31d 100644 --- a/couchpotato/core/media/movie/_base/static/movie.actions.js +++ b/couchpotato/core/media/movie/_base/static/movie.actions.js @@ -302,7 +302,7 @@ MA.Release = new Class({ self.movie.data.releases.each(function(release){ if(has_available && has_snatched) return; - if(['snatched', 'downloaded', 'seeding'].contains(release.status)) + if(['snatched', 'downloaded', 'seeding', 'done'].contains(release.status)) has_snatched = true; if(['available'].contains(release.status)) From fdcdf07fa6ee5664a550ab1023127d2ef9baa67e Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 22 Jun 2014 20:35:19 +0200 Subject: [PATCH 7/7] Untag on delete from dashboard --- couchpotato/core/media/_base/media/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/couchpotato/core/media/_base/media/main.py b/couchpotato/core/media/_base/media/main.py index b4c8ced0..1340aa6a 100644 --- a/couchpotato/core/media/_base/media/main.py +++ b/couchpotato/core/media/_base/media/main.py @@ -411,6 +411,8 @@ class MediaPlugin(MediaBase): elif new_media_status: media['status'] = new_media_status db.update(media) + + fireEvent('media.untag', media['_id'], 'recent', single = True) else: fireEvent('media.restatus', media.get('_id'), single = True)