mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-17 21:25:39 -04:00
Merge branch 'custom-naming' into develop
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<select class="span2 x-starting-season">
|
||||
<select class="starting-season x-starting-season">
|
||||
{{#each this}}
|
||||
{{#if_eq seasonNumber compare="0"}}
|
||||
<option value="{{seasonNumber}}">Specials</option>
|
||||
|
||||
@@ -22,6 +22,7 @@ define(
|
||||
ui: {
|
||||
qualityProfile: '.x-quality-profile',
|
||||
rootFolder : '.x-root-folder',
|
||||
seasonFolder : '.x-season-folder',
|
||||
addButton : '.x-add',
|
||||
overview : '.x-overview',
|
||||
startingSeason: '.x-starting-season'
|
||||
@@ -30,7 +31,8 @@ define(
|
||||
events: {
|
||||
'click .x-add' : '_addSeries',
|
||||
'change .x-quality-profile': '_qualityProfileChanged',
|
||||
'change .x-root-folder' : '_rootFolderChanged'
|
||||
'change .x-root-folder' : '_rootFolderChanged',
|
||||
'change .x-season-folder' : '_seasonFolderChanged'
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
@@ -51,6 +53,7 @@ define(
|
||||
|
||||
var defaultQuality = Config.getValue(Config.Keys.DefaultQualityProfileId);
|
||||
var defaultRoot = Config.getValue(Config.Keys.DefaultRootFolderId);
|
||||
var useSeasonFolder = Config.getValueBoolean(Config.Keys.UseSeasonFolder, true);
|
||||
|
||||
if (QualityProfiles.get(defaultQuality)) {
|
||||
this.ui.qualityProfile.val(defaultQuality);
|
||||
@@ -60,6 +63,8 @@ define(
|
||||
this.ui.rootFolder.val(defaultRoot);
|
||||
}
|
||||
|
||||
this.ui.seasonFolder.prop('checked', useSeasonFolder);
|
||||
|
||||
var minSeasonNotZero = _.min(_.reject(this.model.get('seasons'), { seasonNumber: 0 }), 'seasonNumber');
|
||||
|
||||
if (minSeasonNotZero) {
|
||||
@@ -91,15 +96,24 @@ define(
|
||||
if (options.key === Config.Keys.DefaultQualityProfileId) {
|
||||
this.ui.qualityProfile.val(options.value);
|
||||
}
|
||||
|
||||
else if (options.key === Config.Keys.DefaultRootFolderId) {
|
||||
this.ui.rootFolder.val(options.value);
|
||||
}
|
||||
|
||||
else if (options.key === Config.Keys.UseSeasonFolder) {
|
||||
this.ui.seasonFolder.prop('checked', options.value);
|
||||
}
|
||||
},
|
||||
|
||||
_qualityProfileChanged: function () {
|
||||
Config.setValue(Config.Keys.DefaultQualityProfileId, this.ui.qualityProfile.val());
|
||||
},
|
||||
|
||||
_seasonFolderChanged: function () {
|
||||
Config.setValue(Config.Keys.UseSeasonFolder, this.ui.seasonFolder.prop('checked'));
|
||||
},
|
||||
|
||||
_rootFolderChanged: function () {
|
||||
var rootFolderValue = this.ui.rootFolder.val();
|
||||
if (rootFolderValue === 'addNew') {
|
||||
@@ -125,16 +139,17 @@ define(
|
||||
var quality = this.ui.qualityProfile.val();
|
||||
var rootFolderPath = this.ui.rootFolder.children(':selected').text();
|
||||
var startingSeason = this.ui.startingSeason.val();
|
||||
var seasonFolder = this.ui.seasonFolder.prop('checked');
|
||||
|
||||
this.model.set('qualityProfileId', quality);
|
||||
this.model.set('rootFolderPath', rootFolderPath);
|
||||
this.model.setSeasonPass(startingSeason);
|
||||
this.model.set('seasonFolder', seasonFolder);
|
||||
|
||||
var self = this;
|
||||
|
||||
SeriesCollection.add(this.model);
|
||||
|
||||
|
||||
var promise = this.model.save();
|
||||
|
||||
promise.done(function () {
|
||||
@@ -159,7 +174,6 @@ define(
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
AsValidatedView.apply(view);
|
||||
|
||||
return view;
|
||||
|
||||
@@ -32,6 +32,14 @@
|
||||
|
||||
{{> StartingSeasonSelectionPartial seasons}}
|
||||
{{> QualityProfileSelectionPartial qualityProfiles}}
|
||||
|
||||
<label class="checkbox-button" title="Use season folders">
|
||||
<input type="checkbox" class="x-season-folder"/>
|
||||
<div class="btn btn-primary btn-icon-only">
|
||||
<i class="icon-folder-close"></i>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<span class="btn btn-success x-add add-series pull-right"> Add
|
||||
<i class="icon-plus"></i>
|
||||
</span>
|
||||
|
||||
@@ -91,6 +91,18 @@
|
||||
.add-series {
|
||||
margin-left : 20px;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
width : 100px;
|
||||
margin-left : 0px;
|
||||
display : inline-block;
|
||||
padding-top : 0px;
|
||||
margin-bottom : 0px;
|
||||
}
|
||||
|
||||
.starting-season {
|
||||
width: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,4 +141,4 @@ li.add-new:hover {
|
||||
overflow: auto;
|
||||
max-height: 300px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ define(
|
||||
},
|
||||
Keys : {
|
||||
DefaultQualityProfileId: 'DefaultQualityProfileId',
|
||||
DefaultRootFolderId: 'DefaultRootFolderId'
|
||||
DefaultRootFolderId: 'DefaultRootFolderId',
|
||||
UseSeasonFolder: 'UseSeasonFolder'
|
||||
},
|
||||
|
||||
getValueBoolean: function (key, defaultValue) {
|
||||
|
||||
33
src/UI/Content/checkbox-button.less
Normal file
33
src/UI/Content/checkbox-button.less
Normal file
@@ -0,0 +1,33 @@
|
||||
@import "Bootstrap/variables";
|
||||
@import "Bootstrap/mixins";
|
||||
|
||||
.checkbox-button div {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media only screen {
|
||||
.checkbox-button {
|
||||
input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
div {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.btn {
|
||||
.buttonBackground(@btnBackground, @btnBackgroundHighlight);
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
input:first-of-type:checked ~ .btn {
|
||||
.buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,11 @@
|
||||
color: #b94a48;
|
||||
}
|
||||
|
||||
.icon-nd-form-info-link:before {
|
||||
.clickable;
|
||||
.icon(@info-sign);
|
||||
}
|
||||
|
||||
.icon-nd-donate:before {
|
||||
.icon(@heart);
|
||||
color: @nzbdroneRed;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
@import "Backgrid/backgrid";
|
||||
@import "prefixer";
|
||||
@import "icons";
|
||||
@import "checkbox-button";
|
||||
@import "spinner";
|
||||
@import "legend";
|
||||
@import "../Shared/Styles/clickable";
|
||||
|
||||
@@ -19,7 +19,11 @@ define(
|
||||
this._modelBinder = new ModelBinder();
|
||||
}
|
||||
|
||||
this._modelBinder.bind(this.model, this.el);
|
||||
var options = {
|
||||
changeTriggers: {'': 'change', '[contenteditable]': 'blur', '[data-onkeyup]': 'keyup'}
|
||||
};
|
||||
|
||||
this._modelBinder.bind(this.model, this.el, null, options);
|
||||
|
||||
if (originalOnRender) {
|
||||
originalOnRender.call(this);
|
||||
|
||||
@@ -23,7 +23,6 @@ define(
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var validatedSync = function (method, model,options) {
|
||||
this.$el.removeAllErrors();
|
||||
arguments[2].isValidatedCall = true;
|
||||
@@ -52,7 +51,6 @@ define(
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
this.prototype.onBeforeClose = function () {
|
||||
|
||||
if (this.model) {
|
||||
|
||||
101
src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingView.js
Normal file
101
src/UI/Settings/MediaManagement/Naming/Basic/BasicNamingView.js
Normal file
@@ -0,0 +1,101 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'underscore',
|
||||
'vent',
|
||||
'marionette',
|
||||
'Settings/MediaManagement/Naming/NamingSampleModel',
|
||||
'Mixins/AsModelBoundView'
|
||||
], function (_, vent, Marionette, NamingSampleModel, AsModelBoundView) {
|
||||
|
||||
var view = Marionette.ItemView.extend({
|
||||
template: 'Settings/MediaManagement/Naming/Basic/BasicNamingViewTemplate',
|
||||
|
||||
ui: {
|
||||
namingOptions : '.x-naming-options',
|
||||
singleEpisodeExample : '.x-single-episode-example',
|
||||
multiEpisodeExample : '.x-multi-episode-example',
|
||||
dailyEpisodeExample : '.x-daily-episode-example'
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this.listenTo(this.model, 'change', this._buildFormat);
|
||||
this._buildFormat();
|
||||
},
|
||||
|
||||
_updateSamples: function () {
|
||||
var data = {
|
||||
renameEpisodes: true,
|
||||
standardEpisodeFormat: this.standardEpisodeFormat,
|
||||
dailyEpisodeFormat: this.dailyEpisodeFormat,
|
||||
multiEpisodeStyle: this.model.get('multiEpisodeStyle')
|
||||
};
|
||||
|
||||
this.namingSampleModel.fetch({data: data});
|
||||
},
|
||||
|
||||
_buildFormat: function () {
|
||||
if (_.has(this.model.changed, 'standardEpisodeFormat') || _.has(this.model.changed, 'dailyEpisodeFormat')) {
|
||||
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');
|
||||
|
||||
if (this.model.get('replaceSpaces')) {
|
||||
standardEpisodeFormat += '{Episode.Title}';
|
||||
dailyEpisodeFormat += '{Episode.Title}';
|
||||
}
|
||||
|
||||
else {
|
||||
standardEpisodeFormat += '{Episode Title}';
|
||||
dailyEpisodeFormat += '{Episode Title}';
|
||||
}
|
||||
}
|
||||
|
||||
if (this.model.get('includeQuality')) {
|
||||
if (this.model.get('replaceSpaces')) {
|
||||
standardEpisodeFormat += ' {Quality.Title}';
|
||||
dailyEpisodeFormat += ' {Quality.Title}';
|
||||
}
|
||||
|
||||
else {
|
||||
standardEpisodeFormat += ' {Quality Title}';
|
||||
dailyEpisodeFormat += ' {Quality Title}';
|
||||
}
|
||||
}
|
||||
|
||||
if (this.model.get('replaceSpaces')) {
|
||||
standardEpisodeFormat = standardEpisodeFormat.replace(/\s/g, '.');
|
||||
dailyEpisodeFormat = dailyEpisodeFormat.replace(/\s/g, '.');
|
||||
}
|
||||
|
||||
this.model.set('standardEpisodeFormat', standardEpisodeFormat);
|
||||
this.model.set('dailyEpisodeFormat', dailyEpisodeFormat);
|
||||
}
|
||||
});
|
||||
|
||||
return AsModelBoundView.call(view);
|
||||
});
|
||||
@@ -0,0 +1,92 @@
|
||||
<div class="control-group">
|
||||
<label class="control-label">Include Series Title</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="includeSeriesTitle"/>
|
||||
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Include Episode Title</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="includeEpisodeTitle"/>
|
||||
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Include Quality</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="includeQuality"/>
|
||||
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Replace Spaces</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="replaceSpaces"/>
|
||||
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Separator</label>
|
||||
|
||||
<div class="controls">
|
||||
<select class="inputClass" name="separator">
|
||||
<option value=" - ">Dash</option>
|
||||
<option value=" ">Space</option>
|
||||
<option value=".">Period</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Numbering Style</label>
|
||||
|
||||
<div class="controls">
|
||||
<select class="inputClass" name="numberStyle">
|
||||
<option value="{season}x{episode:00}">1x05</option>
|
||||
<option value="{season:00}x{episode:00}">01x05</option>
|
||||
<option value="S{season:00}E{episode:00}">S01E05</option>
|
||||
<option value="s{season:00}e{episode:00}">s01e05</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6,5 +6,4 @@ define(
|
||||
return Backbone.Model.extend({
|
||||
url: window.NzbDrone.ApiRoot + '/config/naming/samples'
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,23 +1,35 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'underscore',
|
||||
'marionette',
|
||||
'Config',
|
||||
'Settings/MediaManagement/Naming/NamingSampleModel',
|
||||
'Mixins/AsModelBoundView'
|
||||
], function (Marionette, NamingSampleModel, AsModelBoundView) {
|
||||
'Settings/MediaManagement/Naming/Basic/BasicNamingView',
|
||||
'Mixins/AsModelBoundView',
|
||||
'Mixins/AsValidatedView'
|
||||
], function (_, Marionette, Config, NamingSampleModel, BasicNamingView, AsModelBoundView, AsValidatedView) {
|
||||
|
||||
var view = Marionette.ItemView.extend({
|
||||
var view = Marionette.Layout.extend({
|
||||
template: 'Settings/MediaManagement/Naming/NamingViewTemplate',
|
||||
|
||||
ui: {
|
||||
namingOptions : '.x-naming-options',
|
||||
renameEpisodesCheckbox: '.x-rename-episodes',
|
||||
singleEpisodeExample : '.x-single-episode-example',
|
||||
multiEpisodeExample : '.x-multi-episode-example'
|
||||
multiEpisodeExample : '.x-multi-episode-example',
|
||||
dailyEpisodeExample : '.x-daily-episode-example',
|
||||
namingTokenHelper : '.x-naming-token-helper'
|
||||
},
|
||||
|
||||
events: {
|
||||
'change .x-rename-episodes': '_setFailedDownloadOptionsVisibility'
|
||||
'change .x-rename-episodes' : '_setFailedDownloadOptionsVisibility',
|
||||
'click .x-show-wizard' : '_showWizard',
|
||||
'click .x-naming-token-helper a' : '_addToken'
|
||||
},
|
||||
|
||||
regions: {
|
||||
basicNamingRegion: '.x-basic-naming'
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
@@ -25,6 +37,8 @@ define(
|
||||
this.ui.namingOptions.hide();
|
||||
}
|
||||
|
||||
var basicNamingView = new BasicNamingView({ model: this.model });
|
||||
this.basicNamingRegion.show(basicNamingView);
|
||||
this.namingSampleModel = new NamingSampleModel();
|
||||
|
||||
this.listenTo(this.model, 'change', this._updateSamples);
|
||||
@@ -44,14 +58,44 @@ define(
|
||||
},
|
||||
|
||||
_updateSamples: function () {
|
||||
if (!_.has(this.model.changed, 'standardEpisodeFormat') && !_.has(this.model.changed, 'dailyEpisodeFormat')) {
|
||||
return;
|
||||
}
|
||||
|
||||
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'));
|
||||
},
|
||||
|
||||
_addToken: function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
var target = e.target;
|
||||
var token = '';
|
||||
var input = this.$(target).closest('.x-helper-input').children('input');
|
||||
|
||||
if (this.$(target).attr('data-token')) {
|
||||
token = '{{0}}'.format(this.$(target).attr('data-token'));
|
||||
}
|
||||
|
||||
else {
|
||||
token = this.$(target).attr('data-separator');
|
||||
}
|
||||
|
||||
input.val(input.val() + token);
|
||||
|
||||
this.ui.namingTokenHelper.removeClass('open');
|
||||
input.focus();
|
||||
}
|
||||
});
|
||||
|
||||
return AsModelBoundView.call(view);
|
||||
AsModelBoundView.call(view);
|
||||
AsValidatedView.call(view);
|
||||
|
||||
return view;
|
||||
});
|
||||
|
||||
@@ -23,96 +23,60 @@
|
||||
</div>
|
||||
|
||||
<div class="x-naming-options">
|
||||
<div class="control-group">
|
||||
<label class="control-label">Include Series Title</label>
|
||||
<div class="basic-setting x-basic-naming"></div>
|
||||
|
||||
<div class="control-group advanced-setting">
|
||||
<label class="control-label">Standard Episode Format</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="includeSeriesTitle"/>
|
||||
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
<div class="input-append x-helper-input">
|
||||
<input type="text" class="naming-format" name="standardEpisodeFormat" data-onkeyup="true" />
|
||||
<div class="btn-group x-naming-token-helper">
|
||||
<button class="btn btn-icon-only dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="icon-plus"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{{> SeriesTitleNamingPartial}}
|
||||
{{> SeasonNamingPartial}}
|
||||
{{> EpisodeNamingPartial}}
|
||||
{{> EpisodeTitleNamingPartial}}
|
||||
{{> QualityTitleNamingPartial}}
|
||||
{{> SeparatorNamingPartial}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<span class="help-inline">
|
||||
<i class="icon-nd-form-info" title="" data-original-title="All caps or all lower-case can also be used"></i>
|
||||
<a href="https://github.com/NzbDrone/NzbDrone/wiki/Sorting-and-Renaming" class="help-link" title="More information"><i class="icon-nd-form-info-link"/></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Include Episode Title</label>
|
||||
<div class="control-group advanced-setting">
|
||||
<label class="control-label">Daily Episode Format</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="includeEpisodeTitle"/>
|
||||
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Include Quality</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="includeQuality"/>
|
||||
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Replace Spaces</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="replaceSpaces"/>
|
||||
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Separator</label>
|
||||
|
||||
<div class="controls">
|
||||
<select class="inputClass" name="separator">
|
||||
<option value=" - ">Dash</option>
|
||||
<option value=" ">Space</option>
|
||||
<option value=".">Period</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Numbering Style</label>
|
||||
|
||||
<div class="controls">
|
||||
<select class="inputClass" name="numberStyle">
|
||||
<option value="0">1x05</option>
|
||||
<option value="1">01x05</option>
|
||||
<option value="2">S01E05</option>
|
||||
<option value="3">s01e05</option>
|
||||
</select>
|
||||
<div class="input-append x-helper-input">
|
||||
<input type="text" class="naming-format" name="dailyEpisodeFormat" data-onkeyup="true" />
|
||||
<div class="btn-group x-naming-token-helper">
|
||||
<button class="btn btn-icon-only dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="icon-plus"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{{> SeriesTitleNamingPartial}}
|
||||
{{> AirDateNamingPartial}}
|
||||
{{> SeasonNamingPartial}}
|
||||
{{> EpisodeNamingPartial}}
|
||||
{{> EpisodeTitleNamingPartial}}
|
||||
{{> QualityTitleNamingPartial}}
|
||||
{{> SeparatorNamingPartial}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<span class="help-inline">
|
||||
<i class="icon-nd-form-info" title="" data-original-title="All caps or all lower-case can also be used"></i>
|
||||
<a href="https://github.com/NzbDrone/NzbDrone/wiki/Sorting-and-Renaming" class="help-link" title="More information"><i class="icon-nd-form-info-link"/></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -130,6 +94,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Season Folder Format</label>
|
||||
|
||||
<div class="controls">
|
||||
<div class="input-append x-helper-input">
|
||||
<input type="text" class="naming-format" name="seasonFolderFormat"/>
|
||||
<div class="btn-group x-naming-token-helper">
|
||||
<button class="btn btn-icon-only dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="icon-plus"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{{> SeriesTitleNamingPartial}}
|
||||
{{> SeasonNamingPartial}}
|
||||
{{> SeparatorNamingPartial}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Single Episode Example</label>
|
||||
|
||||
@@ -145,4 +129,12 @@
|
||||
<span class="x-multi-episode-example naming-example"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Daily-Episode Example</label>
|
||||
|
||||
<div class="controls">
|
||||
<span class="x-daily-episode-example naming-example"></span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" tabindex="-1" data-token="Air-Date">Air-Date</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" data-token="Air-Date">Air-Date</a></li>
|
||||
<li><a href="#" data-token="Air Date">Air Date</a></li>
|
||||
<li><a href="#" data-token="Air.Date">Air.Date</a></li>
|
||||
<li><a href="#" data-token="Air_Date">Air_Date</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -0,0 +1,7 @@
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" tabindex="-1" data-token="episode">Episode</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" data-token="episode">1</a></li>
|
||||
<li><a href="#" data-token="episode:00">01</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -0,0 +1,8 @@
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" tabindex="-1" data-token="Episode Title">Episode Title</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" data-token="Episode Title">Episode Title</a></li>
|
||||
<li><a href="#" data-token="Episode.Title">Episode.Title</a></li>
|
||||
<li><a href="#" data-token="Episode_Title">Episode_Title</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -0,0 +1,8 @@
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" tabindex="-1" data-token="Quality Title">Quality Title</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" data-token="Quality Title">Quality Title</a></li>
|
||||
<li><a href="#" data-token="Quality.Title">Quality.Title</a></li>
|
||||
<li><a href="#" data-token="Quality_Title">Quality_Title</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -0,0 +1,7 @@
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" tabindex="-1" data-token="season">Season</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" data-token="season">1</a></li>
|
||||
<li><a href="#" data-token="season:00">01</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -0,0 +1,10 @@
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" tabindex="-1">Separator</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" data-separator=" - ">Space-Dash-Space</a></li>
|
||||
<li><a href="#" data-separator="-">Dash</a></li>
|
||||
<li><a href="#" data-separator=" ">Space</a></li>
|
||||
<li><a href="#" data-separator=".">Period</a></li>
|
||||
<li><a href="#" data-separator="_">Underscore</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -0,0 +1,8 @@
|
||||
<li class="dropdown-submenu">
|
||||
<a href="#" tabindex="-1" data-token="Series Title">Series Title</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" data-token="Series Title">Series Title</a></li>
|
||||
<li><a href="#" data-token="Series.Title">Series.Title</a></li>
|
||||
<li><a href="#" data-token="Series_Title">Series_Title</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -1,7 +1,7 @@
|
||||
<fieldset>
|
||||
<fieldset class="advanced-setting">
|
||||
<legend>Folders</legend>
|
||||
|
||||
<div class="control-group advanced-setting">
|
||||
<div class="control-group">
|
||||
<label class="control-label">Create empty series folders</label>
|
||||
|
||||
<div class="controls">
|
||||
@@ -21,33 +21,4 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--TODO: Remove this and move it to Add Series-->
|
||||
<div class="control-group">
|
||||
<label class="control-label">Use Season Folder</label>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" name="useSeasonFolder"/>
|
||||
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Season Folder Format</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="text" placeholder="Season %s" name="seasonFolderFormat"/>
|
||||
<span class="help-inline">
|
||||
<i class="icon-question-sign" title="How should season folders be named? (Use %0s to pad to two digits, %sn for Series Name)"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -6,7 +6,7 @@ define(
|
||||
'backbone',
|
||||
'Settings/SettingsModel',
|
||||
'Settings/General/GeneralSettingsModel',
|
||||
'Settings/MediaManagement/Naming/Model',
|
||||
'Settings/MediaManagement/Naming/NamingModel',
|
||||
'Settings/MediaManagement/MediaManagementLayout',
|
||||
'Settings/Quality/QualityLayout',
|
||||
'Settings/Indexers/IndexerLayout',
|
||||
|
||||
@@ -45,6 +45,10 @@ li.save-and-add:hover {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.naming-format {
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.advanced-settings-toggle {
|
||||
margin-right: 40px;
|
||||
|
||||
@@ -73,8 +77,16 @@ li.save-and-add:hover {
|
||||
}
|
||||
}
|
||||
|
||||
.basic-setting {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.show-advanced-settings {
|
||||
.advanced-setting {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.basic-setting {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,13 @@ define(
|
||||
'Series/Delete/DeleteSeriesView',
|
||||
'Episode/EpisodeDetailsLayout',
|
||||
'History/Details/HistoryDetailsView',
|
||||
'System/Logs/Table/Details/LogDetailsView'
|
||||
'System/Logs/Table/Details/LogDetailsView',
|
||||
], function (vent, AppLayout, Marionette, EditSeriesView, DeleteSeriesView, EpisodeDetailsLayout, HistoryDetailsView, LogDetailsView) {
|
||||
|
||||
return Marionette.AppRouter.extend({
|
||||
|
||||
initialize: function () {
|
||||
vent.on(vent.Commands.OpenModalCommand, this._openModal, this);
|
||||
vent.on(vent.Commands.CloseModalCommand, this._closeModal, this);
|
||||
vent.on(vent.Commands.EditSeriesCommand, this._editSeries, this);
|
||||
vent.on(vent.Commands.DeleteSeriesCommand, this._deleteSeries, this);
|
||||
@@ -22,6 +23,10 @@ define(
|
||||
vent.on(vent.Commands.ShowLogDetails, this._showLogDetails, this);
|
||||
},
|
||||
|
||||
_openModal: function (view) {
|
||||
AppLayout.modalRegion.show(view);
|
||||
},
|
||||
|
||||
_closeModal: function () {
|
||||
AppLayout.modalRegion.closeModal();
|
||||
},
|
||||
|
||||
@@ -18,12 +18,14 @@ define(
|
||||
vent.Commands = {
|
||||
EditSeriesCommand : 'EditSeriesCommand',
|
||||
DeleteSeriesCommand: 'DeleteSeriesCommand',
|
||||
OpenModalCommand : 'OpenModalCommand',
|
||||
CloseModalCommand : 'CloseModalCommand',
|
||||
ShowEpisodeDetails : 'ShowEpisodeDetails',
|
||||
ShowHistoryDetails : 'ShowHistoryDetails',
|
||||
ShowLogDetails : 'ShowLogDetails',
|
||||
SaveSettings : 'saveSettings',
|
||||
ShowLogFile : 'showLogFile'
|
||||
ShowLogFile : 'showLogFile',
|
||||
ShowNamingWizard : 'showNamingWizard'
|
||||
};
|
||||
|
||||
return vent;
|
||||
|
||||
Reference in New Issue
Block a user