removed QualityModel/SeasonModel mutators.

pull/24/head
Keivan Beigi 11 years ago
parent 9835608ff0
commit eceed9f439

@ -6,16 +6,6 @@ define(
'Series/EpisodeModel' 'Series/EpisodeModel'
], function (Backbone, SeriesModel, EpisodeModel) { ], function (Backbone, SeriesModel, EpisodeModel) {
return Backbone.Model.extend({ return Backbone.Model.extend({
mutators: {
seasonNumber: function () {
return this.get('episode').seasonNumber;
},
paddedEpisodeNumber: function () {
return this.get('episode').episodeNumber.pad(2);
}
},
parse: function (model) { parse: function (model) {
model.series = new SeriesModel(model.series); model.series = new SeriesModel(model.series);
model.episode = new EpisodeModel(model.episode); model.episode = new EpisodeModel(model.episode);

@ -16,27 +16,6 @@ define(
this.errorMessage = 'Couldn\'t save ' + name + ' size settings'; this.errorMessage = 'Couldn\'t save ' + name + ' size settings';
this.baseInitialize.call(this); this.baseInitialize.call(this);
},
mutators: {
thirtyMinuteSize: function () {
var maxSize = this.get('maxSize');
if (maxSize === 0) {
return 'No Limit';
}
return (maxSize * 1024 * 1024 * 30).bytes(1);
},
sixtyMinuteSize : function () {
var maxSize = this.get('maxSize');
if (maxSize === 0) {
return 'No Limit';
}
return (maxSize * 1024 * 1024 * 60).bytes(1);
}
} }
}); });
}); });

@ -1,9 +1,13 @@
<div class="series-season"> <div class="series-season">
<h2> <h2>
<i class="x-season-monitored clickable" title="Toggle season monitored status" /> <i class="x-season-monitored clickable" title="Toggle season monitored status"/>
{{seasonTitle}} {{#if seasonNumber}}
Season {{seasonNumber}}
{{else}}
Specials
{{/if}}
<span class="season-actions pull-right"> <span class="season-actions pull-right">
<i class="icon-search x-season-search" title="Search for all episodes in season {{seasonNumber}}" /> <i class="icon-search x-season-search" title="Search for all episodes in season {{seasonNumber}}"/>
</span> </span>
</h2> </h2>
<div id="x-episode-grid"/> <div id="x-episode-grid"/>

@ -5,18 +5,6 @@ define(
], function (Backbone) { ], function (Backbone) {
return Backbone.Model.extend({ return Backbone.Model.extend({
mutators: {
seasonTitle: function () {
var seasonNumber = this.get('seasonNumber');
if (seasonNumber === 0) {
return 'Specials';
}
return 'Season ' + seasonNumber;
}
},
defaults: { defaults: {
seasonNumber: 0 seasonNumber: 0
} }

Loading…
Cancel
Save