mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
updated nuget
This commit is contained in:
parent
60d1d5cdee
commit
5de8b92fe5
@ -123,7 +123,6 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
request.Method = method;
|
request.Method = method;
|
||||||
request.Pipelined = true;
|
|
||||||
request.Timeout = 20000;
|
request.Timeout = 20000;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(options.Host))
|
if (!string.IsNullOrEmpty(options.Host))
|
||||||
|
@ -349,6 +349,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
|
|
||||||
if (diff > 0)
|
if (diff > 0)
|
||||||
{
|
{
|
||||||
|
_logger.Debug("Throttling MovieDb by {0} ms", diff);
|
||||||
await Task.Delay(Convert.ToInt32(diff), cancellationToken).ConfigureAwait(false);
|
await Task.Delay(Convert.ToInt32(diff), cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ using MediaBrowser.Common.Net;
|
|||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
|
using MediaBrowser.Model.Logging;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -22,11 +23,13 @@ namespace MediaBrowser.Providers.Music
|
|||||||
|
|
||||||
private readonly IHttpClient _httpClient;
|
private readonly IHttpClient _httpClient;
|
||||||
private readonly IApplicationHost _appHost;
|
private readonly IApplicationHost _appHost;
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
public MusicBrainzAlbumProvider(IHttpClient httpClient, IApplicationHost appHost)
|
public MusicBrainzAlbumProvider(IHttpClient httpClient, IApplicationHost appHost, ILogger logger)
|
||||||
{
|
{
|
||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
|
_logger = logger;
|
||||||
Current = this;
|
Current = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,11 +288,10 @@ namespace MediaBrowser.Providers.Music
|
|||||||
|
|
||||||
if (diff > 0)
|
if (diff > 0)
|
||||||
{
|
{
|
||||||
|
_logger.Debug("Throttling musicbrainz by {0} ms", diff);
|
||||||
await Task.Delay(Convert.ToInt32(diff), cancellationToken).ConfigureAwait(false);
|
await Task.Delay(Convert.ToInt32(diff), cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
_lastRequestDate = DateTime.Now;
|
|
||||||
|
|
||||||
var doc = new XmlDocument();
|
var doc = new XmlDocument();
|
||||||
|
|
||||||
var userAgent = _appHost.Name + "/" + _appHost.ApplicationVersion;
|
var userAgent = _appHost.Name + "/" + _appHost.ApplicationVersion;
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
using MediaBrowser.Common.Configuration;
|
using System.Net;
|
||||||
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller;
|
using MediaBrowser.Controller;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Connect;
|
using MediaBrowser.Controller.Connect;
|
||||||
using MediaBrowser.Controller.Security;
|
using MediaBrowser.Controller.Security;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
|
using MediaBrowser.Model.Net;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -93,11 +95,26 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|||||||
var hasExistingRecord = !string.IsNullOrWhiteSpace(ConnectServerId) &&
|
var hasExistingRecord = !string.IsNullOrWhiteSpace(ConnectServerId) &&
|
||||||
!string.IsNullOrWhiteSpace(ConnectAccessKey);
|
!string.IsNullOrWhiteSpace(ConnectAccessKey);
|
||||||
|
|
||||||
|
var createNewRegistration = !hasExistingRecord;
|
||||||
|
|
||||||
if (hasExistingRecord)
|
if (hasExistingRecord)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
await UpdateServerRegistration(wanApiAddress).ConfigureAwait(false);
|
await UpdateServerRegistration(wanApiAddress).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
else
|
catch (HttpException ex)
|
||||||
|
{
|
||||||
|
if (!ex.StatusCode.HasValue || ex.StatusCode.Value != HttpStatusCode.NotFound || ex.StatusCode.Value != HttpStatusCode.Unauthorized)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
createNewRegistration = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (createNewRegistration)
|
||||||
{
|
{
|
||||||
await CreateServerRegistration(wanApiAddress).ConfigureAwait(false);
|
await CreateServerRegistration(wanApiAddress).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
@ -136,7 +153,6 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|||||||
url = GetConnectUrl(url);
|
url = GetConnectUrl(url);
|
||||||
url += "?id=" + ConnectServerId;
|
url += "?id=" + ConnectServerId;
|
||||||
|
|
||||||
// TODO: Add Access-Key http request header
|
|
||||||
var options = new HttpRequestOptions
|
var options = new HttpRequestOptions
|
||||||
{
|
{
|
||||||
Url = url,
|
Url = url,
|
||||||
|
@ -168,7 +168,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||||||
|
|
||||||
_listener = NativeWebSocket.IsSupported
|
_listener = NativeWebSocket.IsSupported
|
||||||
? _listener = new HttpListenerServer(_logger, OnRequestReceived)
|
? _listener = new HttpListenerServer(_logger, OnRequestReceived)
|
||||||
//? _listener = new WebSocketSharpListener(_logger)
|
//? _listener = new WebSocketSharpListener(_logger, OnRequestReceived)
|
||||||
: _listener = new WebSocketSharpListener(_logger, OnRequestReceived);
|
: _listener = new WebSocketSharpListener(_logger, OnRequestReceived);
|
||||||
|
|
||||||
_listener.WebSocketHandler = WebSocketHandler;
|
_listener.WebSocketHandler = WebSocketHandler;
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
using MediaBrowser.Model.Logging;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp
|
||||||
|
{
|
||||||
|
public class SocketSharpLogger : WebSocketSharp.Logging.ILogger
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
|
public SocketSharpLogger(ILogger logger)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Debug(string message, params object[] paramList)
|
||||||
|
{
|
||||||
|
_logger.Debug(message, paramList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Error(string message, params object[] paramList)
|
||||||
|
{
|
||||||
|
_logger.Error(message, paramList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ErrorException(string message, Exception exception, params object[] paramList)
|
||||||
|
{
|
||||||
|
_logger.ErrorException(message, exception, paramList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Fatal(string message, params object[] paramList)
|
||||||
|
{
|
||||||
|
_logger.Fatal(message, paramList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FatalException(string message, Exception exception, params object[] paramList)
|
||||||
|
{
|
||||||
|
_logger.FatalException(message, exception, paramList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Info(string message, params object[] paramList)
|
||||||
|
{
|
||||||
|
_logger.Info(message, paramList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Warn(string message, params object[] paramList)
|
||||||
|
{
|
||||||
|
_logger.Warn(message, paramList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -35,7 +35,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.SocketSharp
|
|||||||
public void Start(IEnumerable<string> urlPrefixes)
|
public void Start(IEnumerable<string> urlPrefixes)
|
||||||
{
|
{
|
||||||
if (_listener == null)
|
if (_listener == null)
|
||||||
_listener = new WebSocketSharp.Net.HttpListener();
|
_listener = new HttpListener(new SocketSharpLogger(_logger));
|
||||||
|
|
||||||
foreach (var prefix in urlPrefixes)
|
foreach (var prefix in urlPrefixes)
|
||||||
{
|
{
|
||||||
|
@ -162,6 +162,7 @@
|
|||||||
<Compile Include="HttpServer\ServerLogger.cs" />
|
<Compile Include="HttpServer\ServerLogger.cs" />
|
||||||
<Compile Include="HttpServer\Security\SessionContext.cs" />
|
<Compile Include="HttpServer\Security\SessionContext.cs" />
|
||||||
<Compile Include="HttpServer\SocketSharp\SharpWebSocket.cs" />
|
<Compile Include="HttpServer\SocketSharp\SharpWebSocket.cs" />
|
||||||
|
<Compile Include="HttpServer\SocketSharp\SocketSharpLogger.cs" />
|
||||||
<Compile Include="HttpServer\StreamWriter.cs" />
|
<Compile Include="HttpServer\StreamWriter.cs" />
|
||||||
<Compile Include="HttpServer\SwaggerService.cs" />
|
<Compile Include="HttpServer\SwaggerService.cs" />
|
||||||
<Compile Include="Drawing\ImageProcessor.cs" />
|
<Compile Include="Drawing\ImageProcessor.cs" />
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.429</version>
|
<version>3.0.430</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.429" />
|
<dependency id="MediaBrowser.Common" version="3.0.430" />
|
||||||
<dependency id="NLog" version="3.1.0.0" />
|
<dependency id="NLog" version="3.1.0.0" />
|
||||||
<dependency id="SimpleInjector" version="2.5.2" />
|
<dependency id="SimpleInjector" version="2.5.2" />
|
||||||
<dependency id="sharpcompress" version="0.10.2" />
|
<dependency id="sharpcompress" version="0.10.2" />
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.429</version>
|
<version>3.0.430</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Model.Signed</id>
|
<id>MediaBrowser.Model.Signed</id>
|
||||||
<version>3.0.429</version>
|
<version>3.0.430</version>
|
||||||
<title>MediaBrowser.Model - Signed Edition</title>
|
<title>MediaBrowser.Model - Signed Edition</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.429</version>
|
<version>3.0.430</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.429" />
|
<dependency id="MediaBrowser.Common" version="3.0.430" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
Loading…
Reference in New Issue
Block a user