mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 00:53:57 -07:00
Added hint for tvdb: imdb: search prefixes. Also fixed the series title overflow issue.
This commit is contained in:
parent
8f192e635f
commit
981ffb09fc
8 changed files with 51 additions and 6 deletions
|
@ -5,10 +5,11 @@ define(
|
|||
'marionette',
|
||||
'AddSeries/AddSeriesCollection',
|
||||
'AddSeries/SearchResultCollectionView',
|
||||
'AddSeries/EmptyView',
|
||||
'AddSeries/NotFoundView',
|
||||
'Shared/LoadingView',
|
||||
'underscore'
|
||||
], function (vent, Marionette, AddSeriesCollection, SearchResultCollectionView, NotFoundView, LoadingView, _) {
|
||||
], function (vent, Marionette, AddSeriesCollection, SearchResultCollectionView, EmptyView, NotFoundView, LoadingView, _) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'AddSeries/AddSeriesViewTemplate',
|
||||
|
||||
|
@ -64,13 +65,14 @@ define(
|
|||
return;
|
||||
}
|
||||
|
||||
self.searchResult.close();
|
||||
self._abortExistingSearch();
|
||||
self.throttledSearch({
|
||||
term: self.ui.seriesSearch.val()
|
||||
});
|
||||
});
|
||||
|
||||
this._clearResults();
|
||||
|
||||
if (this.isExisting) {
|
||||
this.ui.searchBar.hide();
|
||||
}
|
||||
|
@ -104,7 +106,7 @@ define(
|
|||
|
||||
else if (!this.isExisting) {
|
||||
this.collection.reset();
|
||||
this.searchResult.close();
|
||||
this._clearResults();
|
||||
this.ui.seriesSearch.val('');
|
||||
this.ui.seriesSearch.focus();
|
||||
}
|
||||
|
@ -118,6 +120,15 @@ define(
|
|||
this.ui.loadMore.hide();
|
||||
}
|
||||
},
|
||||
|
||||
_clearResults: function () {
|
||||
if (!this.isExisting) {
|
||||
this.searchResult.show(new EmptyView());
|
||||
}
|
||||
else {
|
||||
this.searchResult.close();
|
||||
}
|
||||
},
|
||||
|
||||
_showResults: function () {
|
||||
if (!this.isClosed) {
|
||||
|
@ -139,6 +150,9 @@ define(
|
|||
console.log('aborting previous pending search request.');
|
||||
this.currentSearchPromise.abort();
|
||||
}
|
||||
else {
|
||||
this._clearResults();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue