mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Commands return immediately and signalr is used to control the UI
This commit is contained in:
parent
772ab3c921
commit
c96ba5efd3
55 changed files with 439 additions and 238 deletions
|
@ -7,9 +7,8 @@ define(
|
|||
'Cells/EpisodeTitleCell',
|
||||
'Cells/RelativeDateCell',
|
||||
'Cells/EpisodeStatusCell',
|
||||
'Commands/CommandController',
|
||||
'Shared/Actioneer'
|
||||
], function ( Marionette, Backgrid, ToggleCell, EpisodeTitleCell, RelativeDateCell, EpisodeStatusCell, CommandController, Actioneer) {
|
||||
], function ( Marionette, Backgrid, ToggleCell, EpisodeTitleCell, RelativeDateCell, EpisodeStatusCell, Actioneer) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Series/Details/SeasonLayoutTemplate',
|
||||
|
||||
|
@ -101,9 +100,10 @@ define(
|
|||
seriesId : this.model.get('seriesId'),
|
||||
seasonNumber: this.model.get('seasonNumber')
|
||||
},
|
||||
element : this.ui.seasonSearch,
|
||||
failMessage : 'Search for season {0} failed'.format(this.model.get('seasonNumber')),
|
||||
startMessage: 'Search for season {0} started'.format(this.model.get('seasonNumber'))
|
||||
element : this.ui.seasonSearch,
|
||||
errorMessage : 'Search for season {0} failed'.format(this.model.get('seasonNumber')),
|
||||
startMessage : 'Search for season {0} started'.format(this.model.get('seasonNumber')),
|
||||
successMessage: 'Search for season {0} completed'.format(this.model.get('seasonNumber'))
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -143,13 +143,13 @@ define(
|
|||
|
||||
_seasonRename: function () {
|
||||
Actioneer.ExecuteCommand({
|
||||
command : 'renameSeason',
|
||||
properties : {
|
||||
command : 'renameSeason',
|
||||
properties : {
|
||||
seriesId : this.model.get('seriesId'),
|
||||
seasonNumber: this.model.get('seasonNumber')
|
||||
},
|
||||
element : this.ui.seasonRename,
|
||||
failMessage: 'Season rename failed'
|
||||
element : this.ui.seasonRename,
|
||||
errorMessage: 'Season rename failed'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -51,7 +51,7 @@ define(
|
|||
seasonNumber: this.model.get('seasonNumber')
|
||||
},
|
||||
element : this.ui.seasonSearch,
|
||||
failMessage : 'Search for season {0} failed'.format(this.model.get('seasonNumber')),
|
||||
errorMessage: 'Search for season {0} failed'.format(this.model.get('seasonNumber')),
|
||||
startMessage: 'Search for season {0} started'.format(this.model.get('seasonNumber'))
|
||||
});
|
||||
},
|
||||
|
|
|
@ -154,10 +154,10 @@ define(
|
|||
properties : {
|
||||
seriesId: this.model.get('id')
|
||||
},
|
||||
element : this.ui.rename,
|
||||
context : this,
|
||||
onSuccess : this._refetchEpisodeFiles,
|
||||
failMessage: 'Series search failed'
|
||||
element : this.ui.rename,
|
||||
context : this,
|
||||
onSuccess : this._refetchEpisodeFiles,
|
||||
errorMessage: 'Series search failed'
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -168,7 +168,7 @@ define(
|
|||
seriesId: this.model.get('id')
|
||||
},
|
||||
element : this.ui.search,
|
||||
failMessage : 'Series search failed',
|
||||
errorMessage: 'Series search failed',
|
||||
startMessage: 'Search for {0} started'.format(this.model.get('title'))
|
||||
});
|
||||
},
|
||||
|
|
|
@ -140,7 +140,6 @@ define(
|
|||
this._fetchCollection();
|
||||
},
|
||||
|
||||
|
||||
initialize: function () {
|
||||
this.seriesCollection = SeriesCollection;
|
||||
|
||||
|
@ -148,7 +147,6 @@ define(
|
|||
this.listenTo(SeriesCollection, 'remove', this._renderView);
|
||||
},
|
||||
|
||||
|
||||
_renderView: function () {
|
||||
|
||||
if (SeriesCollection.length === 0) {
|
||||
|
@ -164,7 +162,6 @@ define(
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
onShow: function () {
|
||||
this._showToolbar();
|
||||
this._renderView();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue