Reduce scope of changes

This commit is contained in:
William Lees 2019-02-12 09:23:51 +11:00
parent 250f03d2d9
commit db4a72df10
6 changed files with 7 additions and 19 deletions

View File

@ -8,7 +8,6 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller; using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Devices;
@ -71,7 +70,6 @@ namespace MediaBrowser.Api.Playback
protected IMediaSourceManager MediaSourceManager { get; private set; } protected IMediaSourceManager MediaSourceManager { get; private set; }
protected IJsonSerializer JsonSerializer { get; private set; } protected IJsonSerializer JsonSerializer { get; private set; }
public static IHttpClient HttpClient { get; private set; }
protected IAuthorizationContext AuthorizationContext { get; private set; } protected IAuthorizationContext AuthorizationContext { get; private set; }
protected EncodingHelper EncodingHelper { get; set; } protected EncodingHelper EncodingHelper { get; set; }
@ -80,7 +78,6 @@ namespace MediaBrowser.Api.Playback
/// Initializes a new instance of the <see cref="BaseStreamingService" /> class. /// Initializes a new instance of the <see cref="BaseStreamingService" /> class.
/// </summary> /// </summary>
protected BaseStreamingService( protected BaseStreamingService(
IHttpClient httpClient,
IServerConfigurationManager serverConfig, IServerConfigurationManager serverConfig,
IUserManager userManager, IUserManager userManager,
ILibraryManager libraryManager, ILibraryManager libraryManager,
@ -94,7 +91,6 @@ namespace MediaBrowser.Api.Playback
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
IAuthorizationContext authorizationContext) IAuthorizationContext authorizationContext)
{ {
HttpClient = httpClient;
ServerConfigurationManager = serverConfig; ServerConfigurationManager = serverConfig;
UserManager = userManager; UserManager = userManager;
LibraryManager = libraryManager; LibraryManager = libraryManager;

View File

@ -4,7 +4,6 @@ using System.IO;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Dlna;
@ -315,7 +314,6 @@ namespace MediaBrowser.Api.Playback.Hls
} }
public BaseHlsService( public BaseHlsService(
IHttpClient httpClient,
IServerConfigurationManager serverConfig, IServerConfigurationManager serverConfig,
IUserManager userManager, IUserManager userManager,
ILibraryManager libraryManager, ILibraryManager libraryManager,
@ -328,8 +326,7 @@ namespace MediaBrowser.Api.Playback.Hls
IMediaSourceManager mediaSourceManager, IMediaSourceManager mediaSourceManager,
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
IAuthorizationContext authorizationContext) IAuthorizationContext authorizationContext)
: base(httpClient, : base(serverConfig,
serverConfig,
userManager, userManager,
libraryManager, libraryManager,
isoManager, isoManager,

View File

@ -96,7 +96,6 @@ namespace MediaBrowser.Api.Playback.Hls
{ {
public DynamicHlsService( public DynamicHlsService(
IHttpClient httpClient,
IServerConfigurationManager serverConfig, IServerConfigurationManager serverConfig,
IUserManager userManager, IUserManager userManager,
ILibraryManager libraryManager, ILibraryManager libraryManager,
@ -110,8 +109,7 @@ namespace MediaBrowser.Api.Playback.Hls
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
IAuthorizationContext authorizationContext, IAuthorizationContext authorizationContext,
INetworkManager networkManager) INetworkManager networkManager)
: base(httpClient, : base(serverConfig,
serverConfig,
userManager, userManager,
libraryManager, libraryManager,
isoManager, isoManager,

View File

@ -1,6 +1,5 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Dlna;
@ -133,7 +132,6 @@ namespace MediaBrowser.Api.Playback.Hls
} }
public VideoHlsService( public VideoHlsService(
IHttpClient httpClient,
IServerConfigurationManager serverConfig, IServerConfigurationManager serverConfig,
IUserManager userManager, IUserManager userManager,
ILibraryManager libraryManager, ILibraryManager libraryManager,
@ -146,8 +144,7 @@ namespace MediaBrowser.Api.Playback.Hls
IMediaSourceManager mediaSourceManager, IMediaSourceManager mediaSourceManager,
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
IAuthorizationContext authorizationContext) IAuthorizationContext authorizationContext)
: base(httpClient, : base(serverConfig,
serverConfig,
userManager, userManager,
libraryManager, libraryManager,
isoManager, isoManager,

View File

@ -26,6 +26,7 @@ namespace MediaBrowser.Api.Playback.Progressive
public abstract class BaseProgressiveStreamingService : BaseStreamingService public abstract class BaseProgressiveStreamingService : BaseStreamingService
{ {
protected readonly IEnvironmentInfo EnvironmentInfo; protected readonly IEnvironmentInfo EnvironmentInfo;
protected IHttpClient HttpClient { get; private set; }
public BaseProgressiveStreamingService( public BaseProgressiveStreamingService(
IHttpClient httpClient, IHttpClient httpClient,
@ -42,8 +43,7 @@ namespace MediaBrowser.Api.Playback.Progressive
IJsonSerializer jsonSerializer, IJsonSerializer jsonSerializer,
IAuthorizationContext authorizationContext, IAuthorizationContext authorizationContext,
IEnvironmentInfo environmentInfo) IEnvironmentInfo environmentInfo)
: base(httpClient, : base(serverConfig,
serverConfig,
userManager, userManager,
libraryManager, libraryManager,
isoManager, isoManager,
@ -57,6 +57,7 @@ namespace MediaBrowser.Api.Playback.Progressive
authorizationContext) authorizationContext)
{ {
EnvironmentInfo = environmentInfo; EnvironmentInfo = environmentInfo;
HttpClient = httpClient;
} }
/// <summary> /// <summary>

View File

@ -280,8 +280,7 @@ namespace MediaBrowser.Api.Playback
if (!isStatic && string.Equals(mediaSource.TranscodingSubProtocol, "hls", StringComparison.OrdinalIgnoreCase)) if (!isStatic && string.Equals(mediaSource.TranscodingSubProtocol, "hls", StringComparison.OrdinalIgnoreCase))
{ {
var service = new DynamicHlsService(HttpClient, var service = new DynamicHlsService(ServerConfigurationManager,
ServerConfigurationManager,
UserManager, UserManager,
LibraryManager, LibraryManager,
IsoManager, IsoManager,