diff --git a/couchpotato/core/media/movie/_base/main.py b/couchpotato/core/media/movie/_base/main.py index 4299f563..2354d5a1 100644 --- a/couchpotato/core/media/movie/_base/main.py +++ b/couchpotato/core/media/movie/_base/main.py @@ -208,7 +208,6 @@ class MovieBase(MovieTypeBase): q2 = db.query(Movie).join((q, q.c.id == Movie.id)) \ .options(joinedload_all('releases.files')) \ .options(joinedload_all('releases.info')) \ - .options(joinedload_all('profile.types')) \ .options(joinedload_all('library.titles')) \ .options(joinedload_all('library.files')) \ .options(joinedload_all('status')) \ @@ -224,7 +223,6 @@ class MovieBase(MovieTypeBase): movies = [] for movie in results: movies.append(movie.to_dict({ - 'profile': {'types': {}}, 'releases': {'files':{}, 'info': {}}, 'library': {'titles': {}, 'files':{}}, 'files': {}, diff --git a/couchpotato/core/media/movie/_base/static/movie.actions.js b/couchpotato/core/media/movie/_base/static/movie.actions.js index ea6f00f2..0dbea2cd 100644 --- a/couchpotato/core/media/movie/_base/static/movie.actions.js +++ b/couchpotato/core/media/movie/_base/static/movie.actions.js @@ -581,7 +581,7 @@ MA.Edit = new Class({ 'text': profile.label ? profile.label : profile.data.label }).inject(self.profile_select); - if(self.movie.profile && self.movie.profile.data && self.movie.profile.data.id == profile_id) + if(self.movie.get('profile_id') == profile_id) self.profile_select.set('value', profile_id); }); diff --git a/couchpotato/core/media/movie/_base/static/search.js b/couchpotato/core/media/movie/_base/static/search.js index 376e61c9..7332381b 100644 --- a/couchpotato/core/media/movie/_base/static/search.js +++ b/couchpotato/core/media/movie/_base/static/search.js @@ -326,10 +326,10 @@ Block.Search.Item = new Class({ self.options_el.grab( new Element('div', { - 'class': self.info.in_wanted && self.info.in_wanted.profile || in_library ? 'in_library_wanted' : '' + 'class': self.info.in_wanted && self.info.in_wanted.profile_id || in_library ? 'in_library_wanted' : '' }).adopt( - self.info.in_wanted && self.info.in_wanted.profile ? new Element('span.in_wanted', { - 'text': 'Already in wanted list: ' + self.info.in_wanted.profile.label + self.info.in_wanted && self.info.in_wanted.profile_id ? new Element('span.in_wanted', { + 'text': 'Already in wanted list: ' + Quality.getProfile(self.info.in_wanted.profile_id).get('label') }) : (in_library ? new Element('span.in_library', { 'text': 'Already in library: ' + in_library.join(', ') }) : null), @@ -390,7 +390,7 @@ Block.Search.Item = new Class({ self.options_el.addClass('set'); if(categories.length == 0 && self.title_select.getElements('option').length == 1 && profiles.length == 1 && - !(self.info.in_wanted && self.info.in_wanted.profile || in_library)) + !(self.info.in_wanted && self.info.in_wanted.profile_id || in_library)) self.add(); }