mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
Moved SeasonFolderFormat to NamingConfig
Moved UseSeasonFolder to UI only (add series)
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user