diff --git a/UI/Episode/Search/Layout.js b/UI/Episode/Search/Layout.js
index e6cbd1c61..0aa35208a 100644
--- a/UI/Episode/Search/Layout.js
+++ b/UI/Episode/Search/Layout.js
@@ -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
diff --git a/UI/Handlebars/Helpers/Episode.js b/UI/Handlebars/Helpers/Episode.js
index 5ce040299..d7ccc1b5a 100644
--- a/UI/Handlebars/Helpers/Episode.js
+++ b/UI/Handlebars/Helpers/Episode.js
@@ -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));
}
});
diff --git a/UI/Release/DownloadReportCell.js b/UI/Release/DownloadReportCell.js
index bdb1f44bf..2bddb6827 100644
--- a/UI/Release/DownloadReportCell.js
+++ b/UI/Release/DownloadReportCell.js
@@ -16,15 +16,21 @@ define(
var self = this;
- this.$el.html('');
- this.model.save().always(function () {
- self.$el.html('');
+ this.$el.html('');
+ var promise = this.model.save();
+
+ promise.done(function () {
+ self.$el.html('');
+ });
+
+ promise.fail(function () {
+ self.$el.html('');
});
},
render: function () {
- this.$el.html('');
+ this.$el.html('');
return this;
}