1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-24 22:36:19 -04:00

New: Improved Plex Media Server authentication (Manually update settings)

This commit is contained in:
Mark McDowall
2018-06-05 00:39:15 -07:00
committed by Taloth Saldono
parent 897f3fea99
commit 07be9cf47a
34 changed files with 602 additions and 402 deletions
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
@@ -93,7 +93,7 @@ namespace Sonarr.Http.ClientSchema
var fieldAttribute = property.Item2;
var field = new Field
{
Name = prefix + propertyInfo.Name,
Name = prefix + GetCamelCaseName(propertyInfo.Name),
Label = fieldAttribute.Label,
Unit = fieldAttribute.Unit,
HelpText = fieldAttribute.HelpText,
@@ -121,7 +121,7 @@ namespace Sonarr.Http.ClientSchema
}
else
{
result.AddRange(GetFieldMapping(propertyInfo.PropertyType, propertyInfo.Name + ".", t => propertyInfo.GetValue(targetSelector(t), null)));
result.AddRange(GetFieldMapping(propertyInfo.PropertyType, GetCamelCaseName(propertyInfo.Name) + ".", t => propertyInfo.GetValue(targetSelector(t), null)));
}
}
@@ -212,5 +212,10 @@ namespace Sonarr.Http.ClientSchema
return fieldValue => fieldValue;
}
}
private static string GetCamelCaseName(string name)
{
return Char.ToLowerInvariant(name[0]) + name.Substring(1);
}
}
}