#387 trim the spaces from the api key. Tidied up the setting models a bit.

This commit is contained in:
tidusjar 2016-07-20 10:08:44 +01:00
parent c5ad97780f
commit 6392ee0bde
18 changed files with 287 additions and 297 deletions

View file

@ -24,36 +24,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// ************************************************************************/
#endregion
using System;
using Newtonsoft.Json;
using PlexRequests.Helpers;
namespace PlexRequests.Core.SettingModels
{
public class PlexSettings : Settings
public sealed class PlexSettings : ExternalSettings
{
public string Ip { get; set; }
public int Port { get; set; }
public bool Ssl { get; set; }
public string SubDir { get; set; }
public bool AdvancedSearch { get; set; }
public string PlexAuthToken { get; set; }
[JsonIgnore]
public Uri FullUri
{
get
{
if (!string.IsNullOrEmpty(SubDir))
{
var formattedSubDir = Ip.ReturnUriWithSubDir(Port, Ssl, SubDir);
return formattedSubDir;
}
var formatted = Ip.ReturnUri(Port, Ssl);
return formatted;
}
}
}
}