mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 08:07:10 -07:00
fixed issue with number only series title.
series detail page should load much faster.
This commit is contained in:
parent
91cef6d662
commit
f44ef2ff5e
3 changed files with 13 additions and 33 deletions
|
@ -8,6 +8,7 @@ define(
|
|||
'AddSeries/AddSeriesLayout',
|
||||
'Series/Index/SeriesIndexLayout',
|
||||
'Series/Details/SeriesDetailsLayout',
|
||||
'Series/SeriesCollection',
|
||||
'Missing/MissingLayout',
|
||||
'Series/SeriesModel',
|
||||
'Calendar/CalendarLayout',
|
||||
|
@ -17,7 +18,7 @@ define(
|
|||
'System/Layout',
|
||||
'Shared/NotFoundView',
|
||||
'Shared/Modal/Region'
|
||||
], function (App, Marionette, HistoryLayout, SettingsLayout, AddSeriesLayout, SeriesIndexLayout, SeriesDetailsLayout, MissingLayout, SeriesModel, CalendarLayout,
|
||||
], function (App, Marionette, HistoryLayout, SettingsLayout, AddSeriesLayout, SeriesIndexLayout, SeriesDetailsLayout,SeriesCollection, MissingLayout, SeriesModel, CalendarLayout,
|
||||
LogsLayout, LogFileLayout, ReleaseLayout, SystemLayout, NotFoundView) {
|
||||
return Marionette.Controller.extend({
|
||||
|
||||
|
@ -28,15 +29,13 @@ define(
|
|||
|
||||
seriesDetails: function (query) {
|
||||
|
||||
var self = this;
|
||||
this._setTitle('Loading Series');
|
||||
var series = new SeriesModel({ id: query });
|
||||
series.fetch({
|
||||
success: function (seriesModel) {
|
||||
self._setTitle(seriesModel.get('title'));
|
||||
App.mainRegion.show(new SeriesDetailsLayout({ model: seriesModel }));
|
||||
}
|
||||
});
|
||||
var series = SeriesCollection.where({titleSlug : query});
|
||||
|
||||
if(series.length != 0){
|
||||
var targetSeries = series[0];
|
||||
this._setTitle(targetSeries.get('title'));
|
||||
App.mainRegion.show(new SeriesDetailsLayout({ model: targetSeries }));
|
||||
}
|
||||
},
|
||||
|
||||
addSeries: function (action) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue