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',
|
'Release/Collection',
|
||||||
'Shared/SpinnerView',
|
'Shared/SpinnerView',
|
||||||
'Shared/Messenger',
|
'Shared/Messenger',
|
||||||
'Commands/CommandController'
|
'Commands/CommandController',
|
||||||
], function (App, Marionette, ButtonsView, ManualSearchLayout, ReleaseCollection, SpinnerView, Messenger, CommandController) {
|
'Shared/FormatHelpers'
|
||||||
|
], function (App, Marionette, ButtonsView, ManualSearchLayout, ReleaseCollection, SpinnerView, Messenger, CommandController, FormatHelpers) {
|
||||||
|
|
||||||
return Marionette.Layout.extend({
|
return Marionette.Layout.extend({
|
||||||
template: 'Episode/Search/LayoutTemplate',
|
template: 'Episode/Search/LayoutTemplate',
|
||||||
|
@ -42,7 +43,7 @@ define(
|
||||||
var seriesTitle = this.model.get('series').get('title');
|
var seriesTitle = this.model.get('series').get('title');
|
||||||
var season = this.model.get('seasonNumber');
|
var season = this.model.get('seasonNumber');
|
||||||
var episode = this.model.get('episodeNumber');
|
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({
|
Messenger.show({
|
||||||
message: 'Search started for: ' + message
|
message: 'Search started for: ' + message
|
||||||
|
|
|
@ -12,7 +12,7 @@ define(
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
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;
|
var self = this;
|
||||||
|
|
||||||
this.$el.html('<i class =\'icon-spinner icon-spin\' />');
|
this.$el.html('<i class="icon-spinner icon-spin" />');
|
||||||
this.model.save().always(function () {
|
var promise = this.model.save();
|
||||||
self.$el.html('<i class =\'icon-download-alt\' title=\'Add to download queue\' />');
|
|
||||||
|
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 () {
|
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;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue