mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
Naming settings with css fixes.
This commit is contained in:
parent
10f4dd5a60
commit
c345d81c6a
@ -2,9 +2,30 @@
|
|||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
color: #3A87AD;
|
color: #3A87AD;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
vertical-align: text-bottom;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.help-checkbox {
|
.help-inline-checkbox {
|
||||||
margin-top: -20px;
|
float: left;
|
||||||
}
|
padding-left: 7px;
|
||||||
|
padding-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.control-group {*/
|
||||||
|
/*border: 1px solid red;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*.control-label {*/
|
||||||
|
/*border: 1px solid yellow;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*.switch {*/
|
||||||
|
/*border: 1px solid purple;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*.help-inline, .help-checkbox {*/
|
||||||
|
/*border: 1px solid #2e8b57;*/
|
||||||
|
/*}*/
|
@ -7,7 +7,7 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<input type="checkbox" name="sortingUseSceneName" />
|
<input type="checkbox" name="sortingUseSceneName" />
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline help-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-question-sign" title="Use the scene name, ignoring all other naming settings"></i>
|
<i class="icon-question-sign" title="Use the scene name, ignoring all other naming settings"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<input type="checkbox" name="sortingIncludeSeriesName" />
|
<input type="checkbox" name="sortingIncludeSeriesName" />
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline help-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-question-sign" title="Should filenames contain the series name when renamed?"></i>
|
<i class="icon-question-sign" title="Should filenames contain the series name when renamed?"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<input type="checkbox" name="sortingIncludeEpisodeTitle" />
|
<input type="checkbox" name="sortingIncludeEpisodeTitle" />
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline help-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-question-sign" title="Should filenames contain the episode name when renamed?"></i>
|
<i class="icon-question-sign" title="Should filenames contain the episode name when renamed?"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<input type="checkbox" name="sortingReplaceSpaces" />
|
<input type="checkbox" name="sortingReplaceSpaces" />
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline help-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-question-sign" title="Do you want to replace spaces in the filename with periods?"></i>
|
<i class="icon-question-sign" title="Do you want to replace spaces in the filename with periods?"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<input type="checkbox" name="sortingAppendQuality" />
|
<input type="checkbox" name="sortingAppendQuality" />
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline help-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-question-sign" title="Should filenames have the quality appended to the end?"></i>
|
<i class="icon-question-sign" title="Should filenames have the quality appended to the end?"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<input type="checkbox" name="useSeasonFolder" />
|
<input type="checkbox" name="useSeasonFolder" />
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline help-checkbox">
|
<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>
|
<i class="icon-question-sign" title="Should files be stored in season folders by default? (Applied only when a series is added)"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -139,7 +139,7 @@
|
|||||||
<div class="switch">
|
<div class="switch">
|
||||||
<input type="checkbox" name="metadataXbmcEnabled" />
|
<input type="checkbox" name="metadataXbmcEnabled" />
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline help-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-question-sign" title="Enable creating metadata for XBMC"></i>
|
<i class="icon-question-sign" title="Enable creating metadata for XBMC"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -149,9 +149,9 @@
|
|||||||
<label class="control-label">Use Banners</label>
|
<label class="control-label">Use Banners</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<div class="switch">
|
<div class="switch">
|
||||||
<input type="checkbox" name="metadataUseBanners" />
|
<input type="checkbox" name="metadataUseBanners" />
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline help-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-question-sign" title="Use banners instead of posters?"></i>
|
<i class="icon-question-sign" title="Use banners instead of posters?"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,7 +11,7 @@ define([
|
|||||||
|
|
||||||
ui: {
|
ui: {
|
||||||
switch: '.switch',
|
switch: '.switch',
|
||||||
tooltip: '.help-inline i'
|
tooltip: '[class^="help-inline"] i'
|
||||||
},
|
},
|
||||||
|
|
||||||
onRender: function () {
|
onRender: function () {
|
||||||
|
@ -29,7 +29,7 @@ public IEnumerable<Config> All()
|
|||||||
|
|
||||||
public Dictionary<String, Object> AllWithDefaults()
|
public Dictionary<String, Object> AllWithDefaults()
|
||||||
{
|
{
|
||||||
var dict = new Dictionary<String, Object>();
|
var dict = new Dictionary<String, Object>(StringComparer.InvariantCultureIgnoreCase);
|
||||||
|
|
||||||
var type = GetType();
|
var type = GetType();
|
||||||
var properties = type.GetProperties();
|
var properties = type.GetProperties();
|
||||||
@ -545,6 +545,7 @@ public string GetValue(string key, object defaultValue, bool persist = false)
|
|||||||
{
|
{
|
||||||
EnsureCache();
|
EnsureCache();
|
||||||
|
|
||||||
|
key = key.ToLowerInvariant();
|
||||||
string dbValue;
|
string dbValue;
|
||||||
|
|
||||||
if (_cache.TryGetValue(key, out dbValue) && dbValue != null && !String.IsNullOrEmpty(dbValue))
|
if (_cache.TryGetValue(key, out dbValue) && dbValue != null && !String.IsNullOrEmpty(dbValue))
|
||||||
@ -571,6 +572,8 @@ private void SetValue(string key, int value)
|
|||||||
|
|
||||||
public void SetValue(string key, string value)
|
public void SetValue(string key, string value)
|
||||||
{
|
{
|
||||||
|
key = key.ToLowerInvariant();
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(key))
|
if (String.IsNullOrEmpty(key))
|
||||||
throw new ArgumentOutOfRangeException("key");
|
throw new ArgumentOutOfRangeException("key");
|
||||||
if (value == null)
|
if (value == null)
|
||||||
@ -595,17 +598,17 @@ public void SetValue(string key, string value)
|
|||||||
|
|
||||||
public void SaveValues(Dictionary<string, object> configValues)
|
public void SaveValues(Dictionary<string, object> configValues)
|
||||||
{
|
{
|
||||||
//Todo: make this not suck - we need the pascal case of the key
|
|
||||||
//Todo: Can we batch save this without savig default values? Or do we care?
|
|
||||||
|
|
||||||
var allWithDefaults = AllWithDefaults();
|
var allWithDefaults = AllWithDefaults();
|
||||||
|
|
||||||
foreach(var configValue in configValues)
|
foreach(var configValue in configValues)
|
||||||
{
|
{
|
||||||
object currentValue;
|
object currentValue;
|
||||||
allWithDefaults.TryGetValue(configValue.Key, out currentValue);
|
allWithDefaults.TryGetValue(configValue.Key, out currentValue);
|
||||||
|
if (currentValue == null) continue;
|
||||||
|
|
||||||
if (!configValue.Equals(currentValue))
|
var equal = configValue.Value.ToString().Equals(currentValue.ToString());
|
||||||
|
|
||||||
|
if (!equal)
|
||||||
SetValue(configValue.Key, configValue.Value.ToString());
|
SetValue(configValue.Key, configValue.Value.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user