removed QualityModel/SeasonModel mutators.

pull/4/head
Keivan Beigi 12 years ago
parent 9835608ff0
commit eceed9f439

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

@ -16,27 +16,6 @@ define(
this.errorMessage = 'Couldn\'t save ' + name + ' size settings';
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">
<h2>
<i class="x-season-monitored clickable" title="Toggle season monitored status" />
{{seasonTitle}}
<i class="x-season-monitored clickable" title="Toggle season monitored status"/>
{{#if seasonNumber}}
Season {{seasonNumber}}
{{else}}
Specials
{{/if}}
<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>
</h2>
<div id="x-episode-grid"/>

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

Loading…
Cancel
Save