1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-23 22:25:14 -04:00

Added: Importing extra files from downloaded movies and generate metadata such as .nfo (#2506)

Fixes #121, Fixes #167, Fixes #2262 and Fixes #1104
This commit is contained in:
Qstick
2018-02-15 13:39:01 +01:00
committed by Leonardo Galli
parent b40423f3a3
commit e7e9e2b154
78 changed files with 1381 additions and 1759 deletions
@@ -3,7 +3,34 @@ var AsModelBoundView = require('../../../Mixins/AsModelBoundView');
var AsValidatedView = require('../../../Mixins/AsValidatedView');
var view = Marionette.ItemView.extend({
template : 'Settings/MediaManagement/Sorting/SortingViewTemplate'
template : 'Settings/MediaManagement/Sorting/SortingViewTemplate',
events : {
'change .x-import-extra-files' : '_setExtraFileExtensionVisibility'
},
ui : {
importExtraFiles : '.x-import-extra-files',
extraFileExtensions : '.x-extra-file-extensions'
},
onRender : function() {
if (!this.ui.importExtraFiles.prop('checked')) {
this.ui.extraFileExtensions.hide();
}
},
_setExtraFileExtensionVisibility : function() {
var showExtraFileExtensions = this.ui.importExtraFiles.prop('checked');
if (showExtraFileExtensions) {
this.ui.extraFileExtensions.slideDown();
}
else {
this.ui.extraFileExtensions.slideUp();
}
}
});
AsModelBoundView.call(view);
@@ -71,11 +71,11 @@
</div>
</fieldset>
<fieldset class="advanced-setting">
<fieldset>
<legend>Importing</legend>
{{#if_mono}}
<div class="form-group">
<div class="form-group advanced-setting">
<label class="col-sm-3 control-label">Skip Free Space Check</label>
<div class="col-sm-9">
@@ -99,7 +99,7 @@
</div>
{{/if_mono}}
<div class="form-group">
<div class="form-group advanced-setting">
<label class="col-sm-3 control-label">Use Hardlinks instead of Copy</label>
<div class="col-sm-9">
@@ -122,4 +122,39 @@
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Import Extra Files</label>
<div class="col-sm-9">
<div class="input-group">
<label class="checkbox toggle well">
<input type="checkbox" name="importExtraFiles" class="x-import-extra-files"/>
<p>
<span>Yes</span>
<span>No</span>
</p>
<div class="btn btn-primary slide-button"/>
</label>
<span class="help-inline-checkbox">
<i class="icon-sonarr-form-info" title="Import matching extra files (subtitles, nfo, etc) after importing an episode file"/>
</span>
</div>
</div>
</div>
<div class="form-group x-extra-file-extensions">
<label class="col-sm-3 control-label">Extra File Extensions</label>
<div class="col-sm-1 col-sm-push-5 help-inline">
<i class="icon-sonarr-form-info" title="Comma separated list of extra files to import, ie sub,nfo (.nfo will be imported as .nfo-orig)"/>
</div>
<div class="col-sm-5 col-sm-pull-1">
<input type="text" name="extraFileExtensions" class="form-control"/>
</div>
</div>
</fieldset>
@@ -15,7 +15,7 @@
{{#if value}}
<span class="label label-success">{{label}}</span>
{{else}}
<span class="label">{{label}}</span>
<span class="label label-default">{{label}}</span>
{{/if}}
{{/if_eq}}
{{/each}}