-
Notifications
You must be signed in to change notification settings - Fork 0
/
PlexConfig.cs
27 lines (24 loc) · 891 Bytes
/
PlexConfig.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using PlexBuilder.Concrete;
using PlexBuilder.Models;
using System;
namespace PlexBuilder
{
public sealed class PlexConfig
{
public static Uri BaseUrl { get; set; }
public static string Token { get; set; }
public static string TokenKey => "X-Plex-Token";
public static string PContainerStartKey => "X-Plex-Container-Start";
public static string ContainerSizeKey => "X-Plex-Container-Size";
public static string SortKey => "sort";
public static string SortDateAddedDescValue => "addedAt:desc";
public static string SortDateAddedAscValue => "addedAt:asc";
public static void SetupConfig(AppSettings setting)
{
var login = new PlexLogin(setting);
var token = login.Login().Result;
BaseUrl = new Uri(setting.PlexServer);
Token = token;
}
}
}