mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
parent
9dee1d6fad
commit
811a4bf117
@ -62,56 +62,29 @@ var view = Marionette.ItemView.extend({
|
||||
return;
|
||||
}
|
||||
|
||||
var standardEpisodeFormat = '';
|
||||
var dailyEpisodeFormat = '';
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
standardEpisodeFormat += this.model.get('numberStyle');
|
||||
dailyEpisodeFormat += '{Air-Date}';
|
||||
|
||||
if (this.model.get('includeEpisodeTitle')) {
|
||||
standardEpisodeFormat += this.model.get('separator');
|
||||
dailyEpisodeFormat += this.model.get('separator');
|
||||
var movieFormat = "";
|
||||
|
||||
if (this.model.get('replaceSpaces')) {
|
||||
standardEpisodeFormat += '{Episode.Title}';
|
||||
dailyEpisodeFormat += '{Episode.Title}';
|
||||
movieFormat += '{Movie.Title}';
|
||||
} else {
|
||||
standardEpisodeFormat += '{Episode Title}';
|
||||
dailyEpisodeFormat += '{Episode Title}';
|
||||
}
|
||||
movieFormat += '{Movie 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);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user