Cleaned up deps and removed legacy code

This commit is contained in:
Alexander Rufenach
2021-06-04 02:00:00 -04:00
parent da91e6e2c7
commit 9f3eef2cce
5 changed files with 31 additions and 96 deletions
+2 -10
View File
@@ -17,24 +17,16 @@ namespace Jellyfin.Plugin.AnilistSync
public override string Name => "AnilistSync";
public override Guid Id => Guid.Parse("18c2a8ea-afa0-4a0b-aa94-072b492ab80b");
public override string Description => "Jellyfin plugin to scrobble to Anilist";
IHttpClientFactory _httpClientFactory;
public Version version = new Version("2.2.0.0");
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer, IHttpClientFactory htppClientFactory)
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
: base(applicationPaths, xmlSerializer)
{
Instance = this;
_httpClientFactory = htppClientFactory;
}
public static Plugin? Instance { get; private set; }
public HttpClient GetHttpClient() {
var httpClient = _httpClientFactory.CreateClient(NamedClient.Default);
httpClient.DefaultRequestHeaders.UserAgent.Add(
new ProductInfoHeaderValue(Name, Version.ToString()));
return httpClient;
}
public IEnumerable<PluginPageInfo> GetPages()
{