From fab9b96c8e64790b2ff7a5bc5397ff7fc9f0639a Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 23 Jun 2014 13:16:05 +0200 Subject: [PATCH 1/2] Keep done releases when removing from wanted/dashboard. fix #3488 --- couchpotato/core/media/_base/media/main.py | 2 +- couchpotato/core/plugins/release/main.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/media/_base/media/main.py b/couchpotato/core/media/_base/media/main.py index 1e882d15..4cfe597c 100644 --- a/couchpotato/core/media/_base/media/main.py +++ b/couchpotato/core/media/_base/media/main.py @@ -405,7 +405,7 @@ class MediaPlugin(MediaBase): db.delete(release) total_deleted += 1 - if (total_releases == total_deleted and media['status'] != 'active') or (delete_from == 'wanted' and media['status'] == 'active') or (not new_media_status and delete_from == 'late'): + if (total_releases == total_deleted and media['status'] != 'active') or (not new_media_status and delete_from == 'late'): db.delete(media) deleted = True elif new_media_status: diff --git a/couchpotato/core/plugins/release/main.py b/couchpotato/core/plugins/release/main.py index 9e7e4ca7..cb16c5ae 100644 --- a/couchpotato/core/plugins/release/main.py +++ b/couchpotato/core/plugins/release/main.py @@ -477,7 +477,7 @@ class Release(Plugin): rel = db.get('id', release_id) if rel and rel.get('status') != status: - release_name = rel['info'].get('name') + release_name = None if rel.get('files'): for file_type in rel.get('files', {}): if file_type == 'movie': @@ -485,6 +485,9 @@ class Release(Plugin): release_name = os.path.basename(release_file) break + if not release_name and rel.get('info'): + release_name = rel['info'].get('name') + #update status in Db log.debug('Marking release %s as %s', (release_name, status)) rel['status'] = status From a37517bf6a09ab9e1ccdb5d4a459c70f09bc1554 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 23 Jun 2014 13:37:13 +0200 Subject: [PATCH 2/2] Use ssl startup options. fix #3490 Thanks @sjmcinness --- couchpotato/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/runner.py b/couchpotato/runner.py index 3a779ba2..8a446051 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -293,7 +293,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En 'keyfile': config['ssl_key'], } - server = HTTPServer(application, no_keep_alive = True) + server = HTTPServer(application, no_keep_alive = True, ssl_options = ssl_options) try_restart = True restart_tries = 5