mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Fixed episode details, manual download will show check on success
This commit is contained in:
parent
207d9c256d
commit
0c12183b93
@ -8,8 +8,9 @@ define(
|
||||
'Release/Collection',
|
||||
'Shared/SpinnerView',
|
||||
'Shared/Messenger',
|
||||
'Commands/CommandController'
|
||||
], function (App, Marionette, ButtonsView, ManualSearchLayout, ReleaseCollection, SpinnerView, Messenger, CommandController) {
|
||||
'Commands/CommandController',
|
||||
'Shared/FormatHelpers'
|
||||
], function (App, Marionette, ButtonsView, ManualSearchLayout, ReleaseCollection, SpinnerView, Messenger, CommandController, FormatHelpers) {
|
||||
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Episode/Search/LayoutTemplate',
|
||||
@ -42,7 +43,7 @@ define(
|
||||
var seriesTitle = this.model.get('series').get('title');
|
||||
var season = this.model.get('seasonNumber');
|
||||
var episode = this.model.get('episodeNumber');
|
||||
var message = seriesTitle + ' - S' + season.pad(2) + 'E' + episode.pad(2);
|
||||
var message = seriesTitle + ' - ' + season + 'x' + FormatHelpers.pad(episode, 2);
|
||||
|
||||
Messenger.show({
|
||||
message: 'Search started for: ' + message
|
||||
|
@ -12,7 +12,7 @@ define(
|
||||
}
|
||||
|
||||
else {
|
||||
return '{0}x{1}'.format(this.seasonNumber, this.episodeNumber.pad(2));
|
||||
return '{0}x{1}'.format(this.seasonNumber, FormatHelpers.pad(this.episodeNumber, 2));
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -16,15 +16,21 @@ define(
|
||||
|
||||
var self = this;
|
||||
|
||||
this.$el.html('<i class =\'icon-spinner icon-spin\' />');
|
||||
this.model.save().always(function () {
|
||||
self.$el.html('<i class =\'icon-download-alt\' title=\'Add to download queue\' />');
|
||||
this.$el.html('<i class="icon-spinner icon-spin" />');
|
||||
var promise = this.model.save();
|
||||
|
||||
promise.done(function () {
|
||||
self.$el.html('<i class="icon-ok" title="Added to downloaded queue" />');
|
||||
});
|
||||
|
||||
promise.fail(function () {
|
||||
self.$el.html('<i class="icon-download-alt" title="Add to download queue" />');
|
||||
});
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
||||
this.$el.html('<i class =\'icon-download-alt\' title=\'Add to download queue\' />');
|
||||
this.$el.html('<i class="icon-download-alt" title="Add to download queue" />');
|
||||
return this;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user