mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-24 22:35:49 -04:00
Added: Setting for Colon Replacement Format (#2711)
Fixes #2140 Fixes #2657
This commit is contained in:
@@ -11,29 +11,27 @@ module.exports = (function() {
|
||||
ui : {
|
||||
namingOptions : '.x-naming-options',
|
||||
renameEpisodesCheckbox : '.x-rename-episodes',
|
||||
singleEpisodeExample : '.x-single-episode-example',
|
||||
multiEpisodeExample : '.x-multi-episode-example',
|
||||
dailyEpisodeExample : '.x-daily-episode-example',
|
||||
animeEpisodeExample : '.x-anime-episode-example',
|
||||
animeMultiEpisodeExample : '.x-anime-multi-episode-example',
|
||||
replacingOptions : '.x-replacing-options',
|
||||
replaceIllegalChars : '.x-replace-illegal-chars',
|
||||
namingTokenHelper : '.x-naming-token-helper',
|
||||
multiEpisodeStyle : '.x-multi-episode-style',
|
||||
seriesFolderExample : '.x-series-folder-example',
|
||||
seasonFolderExample : '.x-season-folder-example',
|
||||
movieExample : '.x-movie-example',
|
||||
movieFolderExample : '.x-movie-folder-example'
|
||||
},
|
||||
events : {
|
||||
"change .x-rename-episodes" : '_setFailedDownloadOptionsVisibility',
|
||||
"click .x-show-wizard" : '_showWizard',
|
||||
"click .x-naming-token-helper a" : '_addToken',
|
||||
"change .x-multi-episode-style" : '_multiEpisodeFomatChanged'
|
||||
'change .x-rename-episodes' : '_setRenameEpisodesVisibility',
|
||||
'change .x-replace-illegal-chars': '_setReplaceIllegalCharsVisibility',
|
||||
'click .x-show-wizard' : '_showWizard',
|
||||
'click .x-naming-token-helper a' : '_addToken',
|
||||
'change .x-multi-episode-style' : '_multiEpisodeFomatChanged'
|
||||
},
|
||||
regions : { basicNamingRegion : '.x-basic-naming' },
|
||||
onRender : function() {
|
||||
if (!this.model.get('renameEpisodes')) {
|
||||
this.ui.namingOptions.hide();
|
||||
}
|
||||
if (!this.model.get('replaceIllegalCharacters')) {
|
||||
this.ui.replacingOptions.hide();
|
||||
}
|
||||
var basicNamingView = new BasicNamingView({ model : this.model });
|
||||
this.basicNamingRegion.show(basicNamingView);
|
||||
this.namingSampleModel = new NamingSampleModel();
|
||||
@@ -41,7 +39,7 @@ module.exports = (function() {
|
||||
this.listenTo(this.namingSampleModel, 'sync', this._showSamples);
|
||||
this._updateSamples();
|
||||
},
|
||||
_setFailedDownloadOptionsVisibility : function() {
|
||||
_setRenameEpisodesVisibility : function() {
|
||||
var checked = this.ui.renameEpisodesCheckbox.prop('checked');
|
||||
if (checked) {
|
||||
this.ui.namingOptions.slideDown();
|
||||
@@ -49,17 +47,18 @@ module.exports = (function() {
|
||||
this.ui.namingOptions.slideUp();
|
||||
}
|
||||
},
|
||||
_setReplaceIllegalCharsVisibility : function() {
|
||||
var checked = this.ui.replaceIllegalChars.prop('checked');
|
||||
if (checked) {
|
||||
this.ui.replacingOptions.slideDown();
|
||||
} else {
|
||||
this.ui.replacingOptions.slideUp();
|
||||
}
|
||||
},
|
||||
_updateSamples : function() {
|
||||
this.namingSampleModel.fetch({ data : this.model.toJSON() });
|
||||
},
|
||||
_showSamples : function() {
|
||||
this.ui.singleEpisodeExample.html(this.namingSampleModel.get('singleEpisodeExample'));
|
||||
this.ui.multiEpisodeExample.html(this.namingSampleModel.get('multiEpisodeExample'));
|
||||
this.ui.dailyEpisodeExample.html(this.namingSampleModel.get('dailyEpisodeExample'));
|
||||
this.ui.animeEpisodeExample.html(this.namingSampleModel.get('animeEpisodeExample'));
|
||||
this.ui.animeMultiEpisodeExample.html(this.namingSampleModel.get('animeMultiEpisodeExample'));
|
||||
this.ui.seriesFolderExample.html(this.namingSampleModel.get('seriesFolderExample'));
|
||||
this.ui.seasonFolderExample.html(this.namingSampleModel.get('seasonFolderExample'));
|
||||
this.ui.movieExample.html(this.namingSampleModel.get('movieExample'));
|
||||
this.ui.movieFolderExample.html(this.namingSampleModel.get('movieFolderExample'));
|
||||
},
|
||||
@@ -86,4 +85,4 @@ module.exports = (function() {
|
||||
AsModelBoundView.call(view);
|
||||
AsValidatedView.call(view);
|
||||
return view;
|
||||
}).call(this);
|
||||
}).call(this);
|
||||
|
||||
Reference in New Issue
Block a user