Don't load profile on movie list
This commit is contained in:
@@ -208,7 +208,6 @@ class MovieBase(MovieTypeBase):
|
|||||||
q2 = db.query(Movie).join((q, q.c.id == Movie.id)) \
|
q2 = db.query(Movie).join((q, q.c.id == Movie.id)) \
|
||||||
.options(joinedload_all('releases.files')) \
|
.options(joinedload_all('releases.files')) \
|
||||||
.options(joinedload_all('releases.info')) \
|
.options(joinedload_all('releases.info')) \
|
||||||
.options(joinedload_all('profile.types')) \
|
|
||||||
.options(joinedload_all('library.titles')) \
|
.options(joinedload_all('library.titles')) \
|
||||||
.options(joinedload_all('library.files')) \
|
.options(joinedload_all('library.files')) \
|
||||||
.options(joinedload_all('status')) \
|
.options(joinedload_all('status')) \
|
||||||
@@ -224,7 +223,6 @@ class MovieBase(MovieTypeBase):
|
|||||||
movies = []
|
movies = []
|
||||||
for movie in results:
|
for movie in results:
|
||||||
movies.append(movie.to_dict({
|
movies.append(movie.to_dict({
|
||||||
'profile': {'types': {}},
|
|
||||||
'releases': {'files':{}, 'info': {}},
|
'releases': {'files':{}, 'info': {}},
|
||||||
'library': {'titles': {}, 'files':{}},
|
'library': {'titles': {}, 'files':{}},
|
||||||
'files': {},
|
'files': {},
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ MA.Edit = new Class({
|
|||||||
'text': profile.label ? profile.label : profile.data.label
|
'text': profile.label ? profile.label : profile.data.label
|
||||||
}).inject(self.profile_select);
|
}).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);
|
self.profile_select.set('value', profile_id);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -326,10 +326,10 @@ Block.Search.Item = new Class({
|
|||||||
|
|
||||||
self.options_el.grab(
|
self.options_el.grab(
|
||||||
new Element('div', {
|
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(
|
}).adopt(
|
||||||
self.info.in_wanted && self.info.in_wanted.profile ? new Element('span.in_wanted', {
|
self.info.in_wanted && self.info.in_wanted.profile_id ? new Element('span.in_wanted', {
|
||||||
'text': 'Already in wanted list: ' + self.info.in_wanted.profile.label
|
'text': 'Already in wanted list: ' + Quality.getProfile(self.info.in_wanted.profile_id).get('label')
|
||||||
}) : (in_library ? new Element('span.in_library', {
|
}) : (in_library ? new Element('span.in_library', {
|
||||||
'text': 'Already in library: ' + in_library.join(', ')
|
'text': 'Already in library: ' + in_library.join(', ')
|
||||||
}) : null),
|
}) : null),
|
||||||
@@ -390,7 +390,7 @@ Block.Search.Item = new Class({
|
|||||||
self.options_el.addClass('set');
|
self.options_el.addClass('set');
|
||||||
|
|
||||||
if(categories.length == 0 && self.title_select.getElements('option').length == 1 && profiles.length == 1 &&
|
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();
|
self.add();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user