removed QualityModel/SeasonModel mutators.

This commit is contained in:
Keivan Beigi 2013-07-16 15:57:06 -07:00
parent 9835608ff0
commit eceed9f439
4 changed files with 7 additions and 46 deletions

View File

@ -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);

View File

@ -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);
}
} }
}); });
}); });

View File

@ -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"/>

View File

@ -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
} }