add httpClient to appropriate constructors
This commit is contained in:
parent
eb4b705167
commit
d8cb34dbbc
|
@ -71,7 +71,7 @@ namespace MediaBrowser.Api.Playback
|
|||
protected IMediaSourceManager MediaSourceManager { get; private set; }
|
||||
protected IJsonSerializer JsonSerializer { get; private set; }
|
||||
|
||||
public static IHttpClient HttpClient;
|
||||
public static IHttpClient HttpClient { get; private set; }
|
||||
protected IAuthorizationContext AuthorizationContext { get; private set; }
|
||||
|
||||
protected EncodingHelper EncodingHelper { get; set; }
|
||||
|
@ -80,6 +80,7 @@ namespace MediaBrowser.Api.Playback
|
|||
/// Initializes a new instance of the <see cref="BaseStreamingService" /> class.
|
||||
/// </summary>
|
||||
protected BaseStreamingService(
|
||||
IHttpClient httpClient,
|
||||
IServerConfigurationManager serverConfig,
|
||||
IUserManager userManager,
|
||||
ILibraryManager libraryManager,
|
||||
|
@ -93,6 +94,7 @@ namespace MediaBrowser.Api.Playback
|
|||
IJsonSerializer jsonSerializer,
|
||||
IAuthorizationContext authorizationContext)
|
||||
{
|
||||
HttpClient = httpClient;
|
||||
ServerConfigurationManager = serverConfig;
|
||||
UserManager = userManager;
|
||||
LibraryManager = libraryManager;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Devices;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
|
@ -33,6 +34,7 @@ namespace MediaBrowser.Api.Playback.Progressive
|
|||
public class AudioService : BaseProgressiveStreamingService
|
||||
{
|
||||
public AudioService(
|
||||
IHttpClient httpClient,
|
||||
IServerConfigurationManager serverConfig,
|
||||
IUserManager userManager,
|
||||
ILibraryManager libraryManager,
|
||||
|
@ -46,7 +48,8 @@ namespace MediaBrowser.Api.Playback.Progressive
|
|||
IJsonSerializer jsonSerializer,
|
||||
IAuthorizationContext authorizationContext,
|
||||
IEnvironmentInfo environmentInfo)
|
||||
: base(serverConfig,
|
||||
: base(httpClient,
|
||||
serverConfig,
|
||||
userManager,
|
||||
libraryManager,
|
||||
isoManager,
|
||||
|
|
|
@ -28,6 +28,7 @@ namespace MediaBrowser.Api.Playback.Progressive
|
|||
protected readonly IEnvironmentInfo EnvironmentInfo;
|
||||
|
||||
public BaseProgressiveStreamingService(
|
||||
IHttpClient httpClient,
|
||||
IServerConfigurationManager serverConfig,
|
||||
IUserManager userManager,
|
||||
ILibraryManager libraryManager,
|
||||
|
@ -41,7 +42,8 @@ namespace MediaBrowser.Api.Playback.Progressive
|
|||
IJsonSerializer jsonSerializer,
|
||||
IAuthorizationContext authorizationContext,
|
||||
IEnvironmentInfo environmentInfo)
|
||||
: base(serverConfig,
|
||||
: base(httpClient,
|
||||
serverConfig,
|
||||
userManager,
|
||||
libraryManager,
|
||||
isoManager,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Devices;
|
||||
using MediaBrowser.Controller.Dlna;
|
||||
|
@ -69,6 +70,7 @@ namespace MediaBrowser.Api.Playback.Progressive
|
|||
public class VideoService : BaseProgressiveStreamingService
|
||||
{
|
||||
public VideoService(
|
||||
IHttpClient httpClient,
|
||||
IServerConfigurationManager serverConfig,
|
||||
IUserManager userManager,
|
||||
ILibraryManager libraryManager,
|
||||
|
@ -82,7 +84,8 @@ namespace MediaBrowser.Api.Playback.Progressive
|
|||
IJsonSerializer jsonSerializer,
|
||||
IAuthorizationContext authorizationContext,
|
||||
IEnvironmentInfo environmentInfo)
|
||||
: base(serverConfig,
|
||||
: base(httpClient,
|
||||
serverConfig,
|
||||
userManager,
|
||||
libraryManager,
|
||||
isoManager,
|
||||
|
|
|
@ -77,6 +77,7 @@ namespace MediaBrowser.Api.Playback
|
|||
public class UniversalAudioService : BaseApiService
|
||||
{
|
||||
public UniversalAudioService(
|
||||
IHttpClient httpClient,
|
||||
IServerConfigurationManager serverConfigurationManager,
|
||||
IUserManager userManager,
|
||||
ILibraryManager libraryManager,
|
||||
|
@ -95,6 +96,7 @@ namespace MediaBrowser.Api.Playback
|
|||
IEnvironmentInfo environmentInfo,
|
||||
ILoggerFactory loggerFactory)
|
||||
{
|
||||
HttpClient = httpClient;
|
||||
ServerConfigurationManager = serverConfigurationManager;
|
||||
UserManager = userManager;
|
||||
LibraryManager = libraryManager;
|
||||
|
@ -115,6 +117,7 @@ namespace MediaBrowser.Api.Playback
|
|||
_logger = loggerFactory.CreateLogger(nameof(UniversalAudioService));
|
||||
}
|
||||
|
||||
protected IHttpClient HttpClient { get; private set; }
|
||||
protected IServerConfigurationManager ServerConfigurationManager { get; private set; }
|
||||
protected IUserManager UserManager { get; private set; }
|
||||
protected ILibraryManager LibraryManager { get; private set; }
|
||||
|
@ -323,7 +326,8 @@ namespace MediaBrowser.Api.Playback
|
|||
}
|
||||
else
|
||||
{
|
||||
var service = new AudioService(ServerConfigurationManager,
|
||||
var service = new AudioService(HttpClient,
|
||||
ServerConfigurationManager,
|
||||
UserManager,
|
||||
LibraryManager,
|
||||
IsoManager,
|
||||
|
|
Loading…
Reference in New Issue
Block a user