|
|
@ -55,8 +55,6 @@ namespace MediaBrowser.Providers.Manager
|
|
|
|
private readonly IFileSystem _fileSystem;
|
|
|
|
private readonly IFileSystem _fileSystem;
|
|
|
|
|
|
|
|
|
|
|
|
private IMetadataService[] _metadataServices = { };
|
|
|
|
private IMetadataService[] _metadataServices = { };
|
|
|
|
private IItemIdentityProvider[] _identityProviders = { };
|
|
|
|
|
|
|
|
private IItemIdentityConverter[] _identityConverters = { };
|
|
|
|
|
|
|
|
private IMetadataProvider[] _metadataProviders = { };
|
|
|
|
private IMetadataProvider[] _metadataProviders = { };
|
|
|
|
private IEnumerable<IMetadataSaver> _savers;
|
|
|
|
private IEnumerable<IMetadataSaver> _savers;
|
|
|
|
private IImageSaver[] _imageSavers;
|
|
|
|
private IImageSaver[] _imageSavers;
|
|
|
@ -92,22 +90,17 @@ namespace MediaBrowser.Providers.Manager
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="imageProviders">The image providers.</param>
|
|
|
|
/// <param name="imageProviders">The image providers.</param>
|
|
|
|
/// <param name="metadataServices">The metadata services.</param>
|
|
|
|
/// <param name="metadataServices">The metadata services.</param>
|
|
|
|
/// <param name="identityProviders">The identity providers.</param>
|
|
|
|
|
|
|
|
/// <param name="identityConverters">The identity converters.</param>
|
|
|
|
|
|
|
|
/// <param name="metadataProviders">The metadata providers.</param>
|
|
|
|
/// <param name="metadataProviders">The metadata providers.</param>
|
|
|
|
/// <param name="metadataSavers">The metadata savers.</param>
|
|
|
|
/// <param name="metadataSavers">The metadata savers.</param>
|
|
|
|
/// <param name="imageSavers">The image savers.</param>
|
|
|
|
/// <param name="imageSavers">The image savers.</param>
|
|
|
|
/// <param name="externalIds">The external ids.</param>
|
|
|
|
/// <param name="externalIds">The external ids.</param>
|
|
|
|
public void AddParts(IEnumerable<IImageProvider> imageProviders, IEnumerable<IMetadataService> metadataServices,
|
|
|
|
public void AddParts(IEnumerable<IImageProvider> imageProviders, IEnumerable<IMetadataService> metadataServices,
|
|
|
|
IEnumerable<IItemIdentityProvider> identityProviders, IEnumerable<IItemIdentityConverter> identityConverters,
|
|
|
|
|
|
|
|
IEnumerable<IMetadataProvider> metadataProviders, IEnumerable<IMetadataSaver> metadataSavers,
|
|
|
|
IEnumerable<IMetadataProvider> metadataProviders, IEnumerable<IMetadataSaver> metadataSavers,
|
|
|
|
IEnumerable<IImageSaver> imageSavers, IEnumerable<IExternalId> externalIds)
|
|
|
|
IEnumerable<IImageSaver> imageSavers, IEnumerable<IExternalId> externalIds)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImageProviders = imageProviders.ToArray();
|
|
|
|
ImageProviders = imageProviders.ToArray();
|
|
|
|
|
|
|
|
|
|
|
|
_metadataServices = metadataServices.OrderBy(i => i.Order).ToArray();
|
|
|
|
_metadataServices = metadataServices.OrderBy(i => i.Order).ToArray();
|
|
|
|
_identityProviders = identityProviders.ToArray();
|
|
|
|
|
|
|
|
_identityConverters = identityConverters.ToArray();
|
|
|
|
|
|
|
|
_metadataProviders = metadataProviders.ToArray();
|
|
|
|
_metadataProviders = metadataProviders.ToArray();
|
|
|
|
_imageSavers = imageSavers.ToArray();
|
|
|
|
_imageSavers = imageSavers.ToArray();
|
|
|
|
_externalIds = externalIds.OrderBy(i => i.Name).ToArray();
|
|
|
|
_externalIds = externalIds.OrderBy(i => i.Name).ToArray();
|
|
|
@ -301,18 +294,6 @@ namespace MediaBrowser.Providers.Manager
|
|
|
|
.ThenBy(GetDefaultOrder);
|
|
|
|
.ThenBy(GetDefaultOrder);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<IItemIdentityProvider<TLookupInfo>> GetItemIdentityProviders<TLookupInfo>()
|
|
|
|
|
|
|
|
where TLookupInfo : ItemLookupInfo
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return _identityProviders.OfType<IItemIdentityProvider<TLookupInfo>>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<IItemIdentityConverter<TLookupInfo>> GetItemIdentityConverters<TLookupInfo>()
|
|
|
|
|
|
|
|
where TLookupInfo : ItemLookupInfo
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return _identityConverters.OfType<IItemIdentityConverter<TLookupInfo>>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IEnumerable<IRemoteImageProvider> GetRemoteImageProviders(IHasImages item, bool includeDisabled)
|
|
|
|
private IEnumerable<IRemoteImageProvider> GetRemoteImageProviders(IHasImages item, bool includeDisabled)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var options = GetMetadataOptions(item);
|
|
|
|
var options = GetMetadataOptions(item);
|
|
|
|