From eceed9f439447efe14856109cb012fc61735f4ef Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Tue, 16 Jul 2013 15:57:06 -0700 Subject: [PATCH] removed QualityModel/SeasonModel mutators. --- UI/History/Model.js | 10 ---------- UI/Quality/QualitySizeModel.js | 21 --------------------- UI/Series/Details/SeasonLayoutTemplate.html | 10 +++++++--- UI/Series/SeasonModel.js | 12 ------------ 4 files changed, 7 insertions(+), 46 deletions(-) diff --git a/UI/History/Model.js b/UI/History/Model.js index c9fea16b2..4af579646 100644 --- a/UI/History/Model.js +++ b/UI/History/Model.js @@ -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); diff --git a/UI/Quality/QualitySizeModel.js b/UI/Quality/QualitySizeModel.js index 85f43f8fb..1b8c6a3cc 100644 --- a/UI/Quality/QualitySizeModel.js +++ b/UI/Quality/QualitySizeModel.js @@ -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); - } } }); }); diff --git a/UI/Series/Details/SeasonLayoutTemplate.html b/UI/Series/Details/SeasonLayoutTemplate.html index a49adc6b1..a555d0a49 100644 --- a/UI/Series/Details/SeasonLayoutTemplate.html +++ b/UI/Series/Details/SeasonLayoutTemplate.html @@ -1,9 +1,13 @@ 

- - {{seasonTitle}} + + {{#if seasonNumber}} + Season {{seasonNumber}} + {{else}} + Specials + {{/if}} - +

diff --git a/UI/Series/SeasonModel.js b/UI/Series/SeasonModel.js index 7fa180272..7a30af04b 100644 --- a/UI/Series/SeasonModel.js +++ b/UI/Series/SeasonModel.js @@ -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 }