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