1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

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'
], 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);

View File

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

View File

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

View File

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