From 526d3839292ab1542d04df6d1d4545b018aa11ad Mon Sep 17 00:00:00 2001 From: mano3m Date: Sun, 13 Oct 2013 12:20:57 +0200 Subject: [PATCH] Fix for release.update The done release has no release info. This is fixed by doing it in the same way as the interface. --- couchpotato/core/plugins/release/main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/release/main.py b/couchpotato/core/plugins/release/main.py index 1b0bdce5..8d58ad28 100644 --- a/couchpotato/core/plugins/release/main.py +++ b/couchpotato/core/plugins/release/main.py @@ -281,8 +281,15 @@ class Release(Plugin): for info in rel.info: item[info.identifier] = info.value + if rel.files: + for file_item in rel.files: + if file_item.type.identifier == 'movie': + release_name = os.path.basename(file_item.path) + break + else: + release_name = item['name'] #update status in Db - log.debug('Marking release %s as %s', (item['name'], status.get("label"))) + log.debug('Marking release %s as %s', (release_name, status.get("label"))) rel.status_id = status.get('id') rel.last_edit = int(time.time()) db.commit()