From ac96b33611e52d81b89dd6a5a3db88b7b0ea1682 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 27 May 2012 22:39:05 +0200 Subject: [PATCH] Check title when movie exists only thanks ipsec --- couchpotato/core/plugins/movie/main.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/couchpotato/core/plugins/movie/main.py b/couchpotato/core/plugins/movie/main.py index 83a20247..66609303 100644 --- a/couchpotato/core/plugins/movie/main.py +++ b/couchpotato/core/plugins/movie/main.py @@ -242,12 +242,13 @@ class MoviePlugin(Plugin): fireEvent('notify.frontend', type = 'movie.busy.%s' % id, data = True) movie = db.query(Movie).filter_by(id = id).first() - # Get current selected title - default_title = '' - for title in movie.library.titles: - if title.default: default_title = title.title - if movie: + + # Get current selected title + default_title = '' + for title in movie.library.titles: + if title.default: default_title = title.title + fireEventAsync('library.update', identifier = movie.library.identifier, default_title = default_title, force = True, on_complete = self.createOnComplete(id))