From 811a4bf117781fe90f18ab0ccd9f796ee605e23e Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Sun, 21 May 2017 18:10:46 +0200 Subject: [PATCH] Fix basic naming settings. Fixes #376 --- .../Naming/Basic/BasicNamingView.js | 47 ++++--------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingView.js b/src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingView.js index 2f6320ac8..5c1dbd79a 100644 --- a/src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingView.js +++ b/src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingView.js @@ -62,56 +62,29 @@ var view = Marionette.ItemView.extend({ return; } - var standardEpisodeFormat = ''; - var dailyEpisodeFormat = ''; + var movieFormat = ""; - if (this.model.get('includeSeriesTitle')) { - if (this.model.get('replaceSpaces')) { - standardEpisodeFormat += '{Series.Title}'; - dailyEpisodeFormat += '{Series.Title}'; - } else { - standardEpisodeFormat += '{Series Title}'; - dailyEpisodeFormat += '{Series Title}'; - } - - standardEpisodeFormat += this.model.get('separator'); - dailyEpisodeFormat += this.model.get('separator'); + if (this.model.get('replaceSpaces')) { + movieFormat += '{Movie.Title}'; + } else { + movieFormat += '{Movie Title}'; } - standardEpisodeFormat += this.model.get('numberStyle'); - dailyEpisodeFormat += '{Air-Date}'; - - if (this.model.get('includeEpisodeTitle')) { - standardEpisodeFormat += this.model.get('separator'); - dailyEpisodeFormat += this.model.get('separator'); - - if (this.model.get('replaceSpaces')) { - standardEpisodeFormat += '{Episode.Title}'; - dailyEpisodeFormat += '{Episode.Title}'; - } else { - standardEpisodeFormat += '{Episode Title}'; - dailyEpisodeFormat += '{Episode Title}'; - } - } + movieFormat += this.model.get('separator') + '{Release Year}' + this.model.get('separator'); if (this.model.get('includeQuality')) { if (this.model.get('replaceSpaces')) { - standardEpisodeFormat += ' {Quality.Title}'; - dailyEpisodeFormat += ' {Quality.Title}'; + movieFormat += '{Quality.Title}'; } else { - standardEpisodeFormat += ' {Quality Title}'; - dailyEpisodeFormat += ' {Quality Title}'; + movieFormat += '{Quality Title}'; } } if (this.model.get('replaceSpaces')) { - standardEpisodeFormat = standardEpisodeFormat.replace(/\s/g, '.'); - dailyEpisodeFormat = dailyEpisodeFormat.replace(/\s/g, '.'); + movieFormat = movieFormat.replace(/\s/g, '.'); } - this.namingModel.set('standardEpisodeFormat', standardEpisodeFormat); - this.namingModel.set('dailyEpisodeFormat', dailyEpisodeFormat); - this.namingModel.set('animeEpisodeFormat', standardEpisodeFormat); + this.namingModel.set('standardMovieFormat', movieFormat); } });