remove unused components

pull/702/head
Luke Pulverenti 9 years ago
parent 3ebfb59456
commit 2733c598b2

@ -302,7 +302,6 @@
<Compile Include="Providers\IMetadataService.cs" /> <Compile Include="Providers\IMetadataService.cs" />
<Compile Include="Providers\IRemoteMetadataProvider.cs" /> <Compile Include="Providers\IRemoteMetadataProvider.cs" />
<Compile Include="Providers\IRemoteSearchProvider.cs" /> <Compile Include="Providers\IRemoteSearchProvider.cs" />
<Compile Include="Providers\ISeriesOrderProvider.cs" />
<Compile Include="Providers\ItemInfo.cs" /> <Compile Include="Providers\ItemInfo.cs" />
<Compile Include="Providers\LiveTvProgramLookupInfo.cs" /> <Compile Include="Providers\LiveTvProgramLookupInfo.cs" />
<Compile Include="Providers\LocalImageInfo.cs" /> <Compile Include="Providers\LocalImageInfo.cs" />
@ -330,7 +329,6 @@
<Compile Include="Subtitles\ISubtitleProvider.cs" /> <Compile Include="Subtitles\ISubtitleProvider.cs" />
<Compile Include="Providers\ItemLookupInfo.cs" /> <Compile Include="Providers\ItemLookupInfo.cs" />
<Compile Include="Providers\MetadataRefreshOptions.cs" /> <Compile Include="Providers\MetadataRefreshOptions.cs" />
<Compile Include="Providers\ISeriesOrderManager.cs" />
<Compile Include="Session\ISessionManager.cs" /> <Compile Include="Session\ISessionManager.cs" />
<Compile Include="Entities\AggregateFolder.cs" /> <Compile Include="Entities\AggregateFolder.cs" />
<Compile Include="Entities\Audio\Audio.cs" /> <Compile Include="Entities\Audio\Audio.cs" />

@ -1,11 +0,0 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Providers
{
public interface ISeriesOrderManager
{
Task<int?> FindSeriesIndex(string orderType, string seriesName);
void AddParts(IEnumerable<ISeriesOrderProvider> orderProviders);
}
}

@ -1,10 +0,0 @@
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Providers
{
public interface ISeriesOrderProvider
{
string OrderType { get; }
Task<int?> FindSeriesIndex(string seriesName);
}
}

@ -1,35 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MediaBrowser.Controller.Providers;
namespace MediaBrowser.Providers.Manager
{
public class SeriesOrderManager : ISeriesOrderManager
{
private Dictionary<string, ISeriesOrderProvider[]> _providers;
public void AddParts(IEnumerable<ISeriesOrderProvider> orderProviders)
{
_providers = orderProviders
.GroupBy(p => p.OrderType)
.ToDictionary(g => g.Key, g => g.ToArray());
}
public async Task<int?> FindSeriesIndex(string orderType, string seriesName)
{
ISeriesOrderProvider[] providers;
if (!_providers.TryGetValue(orderType, out providers))
return null;
foreach (ISeriesOrderProvider provider in providers)
{
int? index = await provider.FindSeriesIndex(seriesName);
if (index != null)
return index;
}
return null;
}
}
}

@ -103,7 +103,6 @@
<Compile Include="Manager\ItemImageProvider.cs" /> <Compile Include="Manager\ItemImageProvider.cs" />
<Compile Include="Manager\ProviderManager.cs" /> <Compile Include="Manager\ProviderManager.cs" />
<Compile Include="Manager\MetadataService.cs" /> <Compile Include="Manager\MetadataService.cs" />
<Compile Include="Manager\SeriesOrderManager.cs" />
<Compile Include="MediaInfo\FFProbeAudioInfo.cs" /> <Compile Include="MediaInfo\FFProbeAudioInfo.cs" />
<Compile Include="MediaInfo\FFProbeProvider.cs" /> <Compile Include="MediaInfo\FFProbeProvider.cs" />
<Compile Include="MediaInfo\FFProbeVideoInfo.cs" /> <Compile Include="MediaInfo\FFProbeVideoInfo.cs" />

@ -38,17 +38,15 @@ namespace MediaBrowser.Providers.TV
private readonly IServerConfigurationManager _config; private readonly IServerConfigurationManager _config;
private readonly CultureInfo _usCulture = new CultureInfo("en-US"); private readonly CultureInfo _usCulture = new CultureInfo("en-US");
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly ISeriesOrderManager _seriesOrder;
private readonly ILibraryManager _libraryManager; private readonly ILibraryManager _libraryManager;
public TvdbSeriesProvider(IZipClient zipClient, IHttpClient httpClient, IFileSystem fileSystem, IServerConfigurationManager config, ILogger logger, ISeriesOrderManager seriesOrder, ILibraryManager libraryManager) public TvdbSeriesProvider(IZipClient zipClient, IHttpClient httpClient, IFileSystem fileSystem, IServerConfigurationManager config, ILogger logger, ILibraryManager libraryManager)
{ {
_zipClient = zipClient; _zipClient = zipClient;
_httpClient = httpClient; _httpClient = httpClient;
_fileSystem = fileSystem; _fileSystem = fileSystem;
_config = config; _config = config;
_logger = logger; _logger = logger;
_seriesOrder = seriesOrder;
_libraryManager = libraryManager; _libraryManager = libraryManager;
Current = this; Current = this;
} }
@ -112,23 +110,11 @@ namespace MediaBrowser.Providers.TV
result.HasMetadata = true; result.HasMetadata = true;
FetchSeriesData(result, itemId.MetadataLanguage, itemId.ProviderIds, cancellationToken); FetchSeriesData(result, itemId.MetadataLanguage, itemId.ProviderIds, cancellationToken);
await FindAnimeSeriesIndex(result.Item, itemId).ConfigureAwait(false);
} }
return result; return result;
} }
private async Task FindAnimeSeriesIndex(Series series, SeriesInfo info)
{
var index = await _seriesOrder.FindSeriesIndex(SeriesOrderTypes.Anime, series.Name);
if (index == null)
return;
var offset = info.AnimeSeriesIndex - index;
var id = string.Format(TvdbSeriesOffsetFormat, series.GetProviderId(MetadataProviders.Tvdb), offset);
series.SetProviderId(TvdbSeriesOffset, id);
}
internal static int? GetSeriesOffset(Dictionary<string, string> seriesProviderIds) internal static int? GetSeriesOffset(Dictionary<string, string> seriesProviderIds)
{ {
string idString; string idString;

@ -160,7 +160,6 @@ namespace MediaBrowser.Server.Startup.Common
private IHttpServer HttpServer { get; set; } private IHttpServer HttpServer { get; set; }
private IDtoService DtoService { get; set; } private IDtoService DtoService { get; set; }
private IImageProcessor ImageProcessor { get; set; } private IImageProcessor ImageProcessor { get; set; }
private ISeriesOrderManager SeriesOrderManager { get; set; }
/// <summary> /// <summary>
/// Gets or sets the media encoder. /// Gets or sets the media encoder.
@ -476,9 +475,6 @@ namespace MediaBrowser.Server.Startup.Common
ProviderManager = new ProviderManager(HttpClient, ServerConfigurationManager, LibraryMonitor, LogManager, FileSystemManager, ApplicationPaths, () => LibraryManager, JsonSerializer); ProviderManager = new ProviderManager(HttpClient, ServerConfigurationManager, LibraryMonitor, LogManager, FileSystemManager, ApplicationPaths, () => LibraryManager, JsonSerializer);
RegisterSingleInstance(ProviderManager); RegisterSingleInstance(ProviderManager);
SeriesOrderManager = new SeriesOrderManager();
RegisterSingleInstance(SeriesOrderManager);
RegisterSingleInstance<ISearchEngine>(() => new SearchEngine(LogManager, LibraryManager, UserManager)); RegisterSingleInstance<ISearchEngine>(() => new SearchEngine(LogManager, LibraryManager, UserManager));
HttpServer = ServerFactory.CreateServer(this, LogManager, ServerConfigurationManager, NetworkManager, "Emby", "web/index.html"); HttpServer = ServerFactory.CreateServer(this, LogManager, ServerConfigurationManager, NetworkManager, "Emby", "web/index.html");
@ -819,8 +815,6 @@ namespace MediaBrowser.Server.Startup.Common
GetExports<IImageSaver>(), GetExports<IImageSaver>(),
GetExports<IExternalId>()); GetExports<IExternalId>());
SeriesOrderManager.AddParts(GetExports<ISeriesOrderProvider>());
ImageProcessor.AddParts(GetExports<IImageEnhancer>()); ImageProcessor.AddParts(GetExports<IImageEnhancer>());
LiveTvManager.AddParts(GetExports<ILiveTvService>(), GetExports<ITunerHost>(), GetExports<IListingsProvider>()); LiveTvManager.AddParts(GetExports<ILiveTvService>(), GetExports<ITunerHost>(), GetExports<IListingsProvider>());

Loading…
Cancel
Save