mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
stuff we did :D
This commit is contained in:
parent
32701d5e84
commit
4cd75cd8aa
29 changed files with 648 additions and 479 deletions
6
UI/Settings/Naming/NamingModel.js
Normal file
6
UI/Settings/Naming/NamingModel.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
"use strict";
|
||||
define(['app'], function () {
|
||||
NzbDrone.Settings.Naming.NamingModel = Backbone.Model.extend({
|
||||
url: NzbDrone.Constants.ApiRoot + '/config/naming'
|
||||
});
|
||||
});
|
|
@ -5,9 +5,7 @@
|
|||
<label class="control-label">Use Scene Name</label>
|
||||
|
||||
<div class="controls">
|
||||
<div class="switch">
|
||||
<input type="checkbox" name="sortingUseSceneName"/>
|
||||
</div>
|
||||
<input type="checkbox" name="useSceneName"/>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="Use the scene name, ignoring all other naming settings"></i>
|
||||
</span>
|
||||
|
@ -15,12 +13,10 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Series Name</label>
|
||||
<label class="control-label">Include Series Title</label>
|
||||
|
||||
<div class="controls">
|
||||
<div class="switch">
|
||||
<input type="checkbox" name="sortingIncludeSeriesName"/>
|
||||
</div>
|
||||
<input type="checkbox" name="includeSeriesTitle"/>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="Should filenames contain the series name when renamed?"></i>
|
||||
</span>
|
||||
|
@ -28,12 +24,10 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Episode Name</label>
|
||||
<label class="control-label">Include Episode Title</label>
|
||||
|
||||
<div class="controls">
|
||||
<div class="switch">
|
||||
<input type="checkbox" name="sortingIncludeEpisodeTitle"/>
|
||||
</div>
|
||||
<input type="checkbox" name="includeEpisodeTitle"/>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="Should filenames contain the episode name when renamed?"></i>
|
||||
</span>
|
||||
|
@ -45,7 +39,7 @@
|
|||
|
||||
<div class="controls">
|
||||
<div class="switch">
|
||||
<input type="checkbox" name="sortingReplaceSpaces"/>
|
||||
<input type="checkbox" name="replaceSpaces"/>
|
||||
</div>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="Do you want to replace spaces in the filename with periods?"></i>
|
||||
|
@ -54,11 +48,11 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Append Quality</label>
|
||||
<label class="control-label">Include Quality</label>
|
||||
|
||||
<div class="controls">
|
||||
<div class="switch">
|
||||
<input type="checkbox" name="sortingAppendQuality"/>
|
||||
<input type="checkbox" name="includeQuality"/>
|
||||
</div>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="Should filenames have the quality appended to the end?"></i>
|
||||
|
@ -67,25 +61,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Use Season Folders</label>
|
||||
|
||||
<div class="controls">
|
||||
<div class="switch">
|
||||
<input type="checkbox" name="useSeasonFolder"/>
|
||||
</div>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-question-sign" title="Should files be stored in season folders by default? (Applied only when a series is added)"></i>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Season Folder Format</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="text" placeholder="Season %s" name="sortingSeasonFolderFormat"/>
|
||||
<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)"></i>
|
||||
</span>
|
||||
|
@ -93,13 +73,13 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Separator Style</label>
|
||||
<label class="control-label">Separator</label>
|
||||
|
||||
<div class="controls">
|
||||
<select class="inputClass x-backlog-setting" name="sortingSeparatorStyle">
|
||||
<option value="0">Dash</option>
|
||||
<option value="1">Space</option>
|
||||
<option value="2">Period</option>
|
||||
<select class="inputClass x-backlog-setting" name="separator">
|
||||
<option value=" - ">Dash</option>
|
||||
<option value=" ">Space</option>
|
||||
<option value=".">Period</option>
|
||||
</select>
|
||||
<span class="help-inline">
|
||||
<i class="icon-question-sign" title="How should NzbDrone separate sections of the filename?"></i>
|
||||
|
@ -111,7 +91,7 @@
|
|||
<label class="control-label">Numbering Style</label>
|
||||
|
||||
<div class="controls">
|
||||
<select class="inputClass x-backlog-setting" name="sortingNumberStyle">
|
||||
<select class="inputClass x-backlog-setting" name="numberStyle">
|
||||
<option value="0">1x05</option>
|
||||
<option value="1">01x05</option>
|
||||
<option value="2">S01E05</option>
|
||||
|
@ -127,7 +107,7 @@
|
|||
<label class="control-label">Multi-Episode Style</label>
|
||||
|
||||
<div class="controls">
|
||||
<select class="inputClass x-backlog-setting" name="sortingMultiEpisodeStyle">
|
||||
<select class="inputClass x-backlog-setting" name="multiEpisodeStyle">
|
||||
<option value="0">Extend</option>
|
||||
<option value="1">Duplicate</option>
|
||||
<option value="2">Repeat</option>
|
||||
|
@ -168,4 +148,4 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
define([
|
||||
'app', 'Settings/SettingsModel'
|
||||
|
||||
], function () {
|
||||
define(['app', 'Settings/Naming/NamingModel'], function () {
|
||||
|
||||
NzbDrone.Settings.Naming.NamingView = Backbone.Marionette.ItemView.extend({
|
||||
template : 'Settings/Naming/NamingTemplate',
|
||||
|
@ -14,11 +10,32 @@ define([
|
|||
},
|
||||
|
||||
initialize: function () {
|
||||
//Listen to save event
|
||||
this.model = new NzbDrone.Settings.Naming.NamingModel();
|
||||
this.model.fetch();
|
||||
|
||||
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this.ui.tooltip.tooltip({ placement: 'right' });
|
||||
},
|
||||
|
||||
saveSettings: function () {
|
||||
this.model.save(undefined, this.syncNotification("Naming Settings Saved", "Couldn't Save Naming Settings"));
|
||||
},
|
||||
|
||||
|
||||
syncNotification: function (success, error) {
|
||||
return {
|
||||
success: function () {
|
||||
window.alert(success);
|
||||
},
|
||||
|
||||
error: function () {
|
||||
window.alert(error);
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
;
|
||||
|
|
|
@ -150,8 +150,22 @@ define([
|
|||
},
|
||||
|
||||
save: function () {
|
||||
this.settings.save();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
NzbDrone.vent.trigger(NzbDrone.Commands.SaveSettings);
|
||||
|
||||
this.settings.save(undefined,
|
||||
{
|
||||
success: function () {
|
||||
window.alert('Saved');
|
||||
},
|
||||
error : function () {
|
||||
window.alert("couldn't save settings");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
;
|
||||
})
|
||||
;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue