re-word internet provider setting
This commit is contained in:
parent
c5f29c67ea
commit
8bf02c9906
|
@ -1,6 +1,7 @@
|
|||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Session;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Model.Users;
|
||||
|
@ -172,12 +173,14 @@ namespace MediaBrowser.Api
|
|||
/// </summary>
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IDtoService _dtoService;
|
||||
private readonly ISessionManager _sessionMananger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserService" /> class.
|
||||
/// </summary>
|
||||
/// <param name="xmlSerializer">The XML serializer.</param>
|
||||
/// <param name="userManager">The user manager.</param>
|
||||
/// <param name="dtoService">The dto service.</param>
|
||||
/// <exception cref="System.ArgumentNullException">xmlSerializer</exception>
|
||||
public UserService(IXmlSerializer xmlSerializer, IUserManager userManager, IDtoService dtoService)
|
||||
: base()
|
||||
|
@ -300,17 +303,15 @@ namespace MediaBrowser.Api
|
|||
throw new ResourceNotFoundException("User not found");
|
||||
}
|
||||
|
||||
var success = await _userManager.AuthenticateUser(user, request.Password).ConfigureAwait(false);
|
||||
var auth = AuthorizationRequestFilterAttribute.GetAuthorization(Request);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
// Unauthorized
|
||||
throw new UnauthorizedAccessException("Invalid user or password entered.");
|
||||
}
|
||||
var session = await _sessionMananger.AuthenticateNewSession(user, request.Password, auth.Client, auth.Version,
|
||||
auth.DeviceId, auth.Device, Request.RemoteIp).ConfigureAwait(false);
|
||||
|
||||
var result = new AuthenticationResult
|
||||
{
|
||||
User = _dtoService.GetUserDto(user)
|
||||
User = _dtoService.GetUserDto(user),
|
||||
SessionInfo = _dtoService.GetSessionInfoDto(session)
|
||||
};
|
||||
|
||||
return result;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.Weather;
|
||||
using MediaBrowser.Model.Weather;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
|
|
|
@ -375,11 +375,6 @@ namespace MediaBrowser.Providers.Manager
|
|||
{
|
||||
if (provider is IRemoteMetadataProvider)
|
||||
{
|
||||
if (!ConfigurationManager.Configuration.EnableInternetProviders)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Array.IndexOf(options.DisabledMetadataFetchers, provider.Name) != -1)
|
||||
{
|
||||
return false;
|
||||
|
@ -410,11 +405,6 @@ namespace MediaBrowser.Providers.Manager
|
|||
{
|
||||
if (provider is IRemoteImageProvider)
|
||||
{
|
||||
if (!ConfigurationManager.Configuration.EnableInternetProviders)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Array.IndexOf(options.DisabledImageFetchers, provider.Name) != -1)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
/// <returns>Task.</returns>
|
||||
public async Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!_config.Configuration.EnableInternetProviders || !_config.Configuration.EnableFanArtUpdates)
|
||||
if (!_config.Configuration.EnableFanArtUpdates)
|
||||
{
|
||||
progress.Report(100);
|
||||
return;
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
/// <returns>Task.</returns>
|
||||
public async Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!_config.Configuration.EnableInternetProviders && !_config.Configuration.EnableTmdbUpdates)
|
||||
if (!_config.Configuration.EnableTmdbUpdates)
|
||||
{
|
||||
progress.Report(100);
|
||||
return;
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace MediaBrowser.Providers.Music
|
|||
/// <returns>Task.</returns>
|
||||
public async Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!_config.Configuration.EnableInternetProviders || !_config.Configuration.EnableFanArtUpdates)
|
||||
if (!_config.Configuration.EnableFanArtUpdates)
|
||||
{
|
||||
progress.Report(100);
|
||||
return;
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace MediaBrowser.Providers.TV
|
|||
/// <returns>Task.</returns>
|
||||
public async Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!_config.Configuration.EnableInternetProviders || !_config.Configuration.EnableFanArtUpdates)
|
||||
if (!_config.Configuration.EnableFanArtUpdates)
|
||||
{
|
||||
progress.Report(100);
|
||||
return;
|
||||
|
|
|
@ -171,7 +171,9 @@ namespace MediaBrowser.Providers.TV
|
|||
hasNewSeasons = await AddDummySeasonFolders(series, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
if (_config.Configuration.EnableInternetProviders)
|
||||
var seriesConfig = _config.Configuration.MetadataOptions.FirstOrDefault(i => string.Equals(i.ItemType, typeof(Series).Name, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (seriesConfig == null || !seriesConfig.DisabledMetadataFetchers.Contains(TvdbSeriesProvider.Current.Name, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
hasNewEpisodes = await AddMissingEpisodes(group.ToList(), seriesDataPath, episodeLookup, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
|
|
|
@ -253,8 +253,6 @@ namespace MediaBrowser.Providers.TV
|
|||
|
||||
private void FetchMainEpisodeInfo(Episode item, string xmlFile, CancellationToken cancellationToken)
|
||||
{
|
||||
var status = ProviderRefreshStatus.Success;
|
||||
|
||||
using (var streamReader = new StreamReader(xmlFile, Encoding.UTF8))
|
||||
{
|
||||
if (!item.LockedFields.Contains(MetadataFields.Cast))
|
||||
|
|
|
@ -73,7 +73,9 @@ namespace MediaBrowser.Providers.TV
|
|||
/// <returns>Task.</returns>
|
||||
public async Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!_config.Configuration.EnableInternetProviders)
|
||||
var seriesConfig = _config.Configuration.MetadataOptions.FirstOrDefault(i => string.Equals(i.ItemType, typeof(Series).Name, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (seriesConfig != null && seriesConfig.DisabledMetadataFetchers.Contains(TvdbSeriesProvider.Current.Name, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
progress.Report(100);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user