1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

removed unused dependencies.

This commit is contained in:
Keivan Beigi 2013-03-05 11:58:53 -08:00
parent 4877ce405e
commit 10f4dd5a60
17 changed files with 25 additions and 87 deletions

View File

@ -8,7 +8,6 @@ namespace NzbDrone.Common.SysTray
{ {
public class SysTrayApp : Form public class SysTrayApp : Form
{ {
private readonly ConfigFileProvider _configFileProvider;
private readonly ProcessProvider _processProvider; private readonly ProcessProvider _processProvider;
private readonly IHostController _hostController; private readonly IHostController _hostController;
private readonly EnvironmentProvider _environmentProvider; private readonly EnvironmentProvider _environmentProvider;
@ -16,10 +15,8 @@ public class SysTrayApp : Form
private readonly NotifyIcon _trayIcon = new NotifyIcon(); private readonly NotifyIcon _trayIcon = new NotifyIcon();
private readonly ContextMenu _trayMenu = new ContextMenu(); private readonly ContextMenu _trayMenu = new ContextMenu();
public SysTrayApp(ConfigFileProvider configFileProvider, ProcessProvider processProvider, public SysTrayApp(ProcessProvider processProvider, IHostController hostController, EnvironmentProvider environmentProvider)
IHostController hostController, EnvironmentProvider environmentProvider)
{ {
_configFileProvider = configFileProvider;
_processProvider = processProvider; _processProvider = processProvider;
_hostController = hostController; _hostController = hostController;
_environmentProvider = environmentProvider; _environmentProvider = environmentProvider;
@ -34,7 +31,7 @@ public void Create()
_trayMenu.MenuItems.Add("Launch Browser", LaunchBrowser); _trayMenu.MenuItems.Add("Launch Browser", LaunchBrowser);
_trayMenu.MenuItems.Add("-"); _trayMenu.MenuItems.Add("-");
_trayMenu.MenuItems.Add("Exit", OnExit); _trayMenu.MenuItems.Add("Exit", OnExit);
_trayIcon.Text = String.Format("NzbDrone - {0}", _environmentProvider.Version); _trayIcon.Text = String.Format("NzbDrone - {0}", _environmentProvider.Version);
_trayIcon.Icon = new Icon(Assembly.GetEntryAssembly().GetManifestResourceStream("NzbDrone.NzbDrone.ico")); _trayIcon.Icon = new Icon(Assembly.GetEntryAssembly().GetManifestResourceStream("NzbDrone.NzbDrone.ico"));

View File

@ -23,7 +23,7 @@ public class TestSearch : SearchBase
public TestSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider, public TestSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider,
IIndexerService indexerService, SceneMappingService sceneMappingService, IIndexerService indexerService, SceneMappingService sceneMappingService,
AllowedDownloadSpecification allowedDownloadSpecification, ISeriesRepository seriesRepository) AllowedDownloadSpecification allowedDownloadSpecification, ISeriesRepository seriesRepository)
: base(seriesService, seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingService, : base(seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingService,
allowedDownloadSpecification) allowedDownloadSpecification)
{ {
} }

View File

@ -1,25 +1,13 @@
using System.Linq; using System.Linq;
using NLog; using NLog;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Model; using NzbDrone.Core.Model;
namespace NzbDrone.Core.DecisionEngine namespace NzbDrone.Core.DecisionEngine
{ {
public class LanguageSpecification public class LanguageSpecification
{ {
private readonly IConfigService _configService;
private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public LanguageSpecification(IConfigService configService)
{
_configService = configService;
}
public LanguageSpecification()
{
}
public virtual bool IsSatisfiedBy(EpisodeParseResult subject) public virtual bool IsSatisfiedBy(EpisodeParseResult subject)
{ {
logger.Trace("Checking if report meets language requirements. {0}", subject.Language); logger.Trace("Checking if report meets language requirements. {0}", subject.Language);

View File

@ -1,6 +1,4 @@
using System.Linq; using System.Linq;
using NLog;
using NzbDrone.Common;
namespace NzbDrone.Core.Instrumentation namespace NzbDrone.Core.Instrumentation
{ {
@ -13,17 +11,10 @@ public interface ILogService
public class LogService : ILogService public class LogService : ILogService
{ {
private readonly ILogRepository _logRepository; private readonly ILogRepository _logRepository;
private readonly DiskProvider _diskProvider;
private readonly EnvironmentProvider _environmentProvider;
private readonly Logger _logger;
public LogService(ILogRepository logRepository, DiskProvider diskProvider, public LogService(ILogRepository logRepository)
EnvironmentProvider environmentProvider, Logger logger)
{ {
_logRepository = logRepository; _logRepository = logRepository;
_diskProvider = diskProvider;
_environmentProvider = environmentProvider;
_logger = logger;
} }
public void DeleteAll() public void DeleteAll()

View File

@ -12,16 +12,14 @@ namespace NzbDrone.Core.Jobs.Implementations
{ {
public class DiskScanJob : IJob public class DiskScanJob : IJob
{ {
private readonly ISeriesService _seriesService;
private readonly DiskScanProvider _diskScanProvider; private readonly DiskScanProvider _diskScanProvider;
private readonly IConfigService _configService; private readonly IConfigService _configService;
private readonly ISeriesRepository _seriesRepository; private readonly ISeriesRepository _seriesRepository;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
public DiskScanJob(ISeriesService seriesService, DiskScanProvider diskScanProvider, public DiskScanJob(DiskScanProvider diskScanProvider,
IConfigService configService, ISeriesRepository seriesRepository) IConfigService configService, ISeriesRepository seriesRepository)
{ {
_seriesService = seriesService;
_diskScanProvider = diskScanProvider; _diskScanProvider = diskScanProvider;
_configService = configService; _configService = configService;
_seriesRepository = seriesRepository; _seriesRepository = seriesRepository;

View File

@ -16,8 +16,6 @@ namespace NzbDrone.Core.Jobs.Implementations
/// </summary> /// </summary>
public class ImportNewSeriesJob : IJob public class ImportNewSeriesJob : IJob
{ {
private readonly ISeriesService _seriesService;
private readonly IEpisodeService _episodeService;
private readonly IMediaFileService _mediaFileService; private readonly IMediaFileService _mediaFileService;
private readonly UpdateInfoJob _updateInfoJob; private readonly UpdateInfoJob _updateInfoJob;
private readonly DiskScanJob _diskScanJob; private readonly DiskScanJob _diskScanJob;
@ -30,13 +28,10 @@ public class ImportNewSeriesJob : IJob
private List<int> _attemptedSeries; private List<int> _attemptedSeries;
public ImportNewSeriesJob(ISeriesService seriesService, IEpisodeService episodeService, public ImportNewSeriesJob(IMediaFileService mediaFileService, UpdateInfoJob updateInfoJob,
IMediaFileService mediaFileService, UpdateInfoJob updateInfoJob,
DiskScanJob diskScanJob, DiskScanJob diskScanJob,
ISeasonRepository seasonRepository, XemUpdateJob xemUpdateJob, ISeriesRepository seriesRepository, ISeasonService seasonService) ISeasonRepository seasonRepository, XemUpdateJob xemUpdateJob, ISeriesRepository seriesRepository, ISeasonService seasonService)
{ {
_seriesService = seriesService;
_episodeService = episodeService;
_mediaFileService = mediaFileService; _mediaFileService = mediaFileService;
_updateInfoJob = updateInfoJob; _updateInfoJob = updateInfoJob;
_diskScanJob = diskScanJob; _diskScanJob = diskScanJob;

View File

@ -2,7 +2,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using NLog; using NLog;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Model.Notification;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
@ -12,16 +11,13 @@ public class PastWeekBacklogSearchJob : IJob
{ {
private readonly IEpisodeService _episodeService; private readonly IEpisodeService _episodeService;
private readonly EpisodeSearchJob _episodeSearchJob; private readonly EpisodeSearchJob _episodeSearchJob;
private readonly IConfigService _configService;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
public PastWeekBacklogSearchJob(IEpisodeService episodeService, EpisodeSearchJob episodeSearchJob, public PastWeekBacklogSearchJob(IEpisodeService episodeService, EpisodeSearchJob episodeSearchJob)
IConfigService configService)
{ {
_episodeService = episodeService; _episodeService = episodeService;
_episodeSearchJob = episodeSearchJob; _episodeSearchJob = episodeSearchJob;
_configService = configService;
} }
public string Name public string Name

View File

@ -11,16 +11,13 @@ namespace NzbDrone.Core.Jobs.Implementations
public class RefreshEpisodeMetadata : IJob public class RefreshEpisodeMetadata : IJob
{ {
private readonly IMediaFileService _mediaFileService; private readonly IMediaFileService _mediaFileService;
private readonly ISeriesService _seriesService;
private readonly ISeriesRepository _seriesRepository; private readonly ISeriesRepository _seriesRepository;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
public RefreshEpisodeMetadata(IMediaFileService mediaFileService, ISeriesService seriesService, public RefreshEpisodeMetadata(IMediaFileService mediaFileService, ISeriesRepository seriesRepository)
ISeriesRepository seriesRepository)
{ {
_mediaFileService = mediaFileService; _mediaFileService = mediaFileService;
_seriesService = seriesService;
_seriesRepository = seriesRepository; _seriesRepository = seriesRepository;
} }
@ -44,10 +41,10 @@ public void Start(ProgressNotification notification, dynamic options)
else else
seriesToRefresh = new List<Series> { _seriesRepository.Get(options.SeriesId) }; seriesToRefresh = new List<Series> { _seriesRepository.Get(options.SeriesId) };
foreach(var series in seriesToRefresh) foreach (var series in seriesToRefresh)
{ {
RefreshMetadata(notification, series); RefreshMetadata(notification, series);
} }
} }
private void RefreshMetadata(ProgressNotification notification, Series series) private void RefreshMetadata(ProgressNotification notification, Series series)

View File

@ -20,7 +20,7 @@ public class RenameSeasonJob : IJob
private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public RenameSeasonJob(IMediaFileService mediaFileService, DiskScanProvider diskScanProvider, ISeriesService seriesService, public RenameSeasonJob(IMediaFileService mediaFileService, DiskScanProvider diskScanProvider,
ISeriesRepository seriesRepository, IEventAggregator eventAggregator) ISeriesRepository seriesRepository, IEventAggregator eventAggregator)
{ {
_mediaFileService = mediaFileService; _mediaFileService = mediaFileService;

View File

@ -18,8 +18,7 @@ public class PostDownloadProvider
private readonly DiskScanProvider _diskScanProvider; private readonly DiskScanProvider _diskScanProvider;
private readonly ISeriesRepository _seriesRepository; private readonly ISeriesRepository _seriesRepository;
public PostDownloadProvider(DiskProvider diskProvider, DiskScanProvider diskScanProvider, public PostDownloadProvider(DiskProvider diskProvider, DiskScanProvider diskScanProvider, ISeriesRepository seriesRepository)
ISeriesService seriesService, ISeriesRepository seriesRepository)
{ {
_diskProvider = diskProvider; _diskProvider = diskProvider;
_diskScanProvider = diskScanProvider; _diskScanProvider = diskScanProvider;

View File

@ -18,16 +18,14 @@ namespace NzbDrone.Core.Providers.Search
{ {
public class DailyEpisodeSearch : SearchBase public class DailyEpisodeSearch : SearchBase
{ {
private readonly ISeriesRepository _seriesRepository;
private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public DailyEpisodeSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService, public DailyEpisodeSearch(IEpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService,
SceneMappingService sceneMappingService, AllowedDownloadSpecification allowedDownloadSpecification, SceneMappingService sceneMappingService, AllowedDownloadSpecification allowedDownloadSpecification,
ISeriesRepository seriesRepository) ISeriesRepository seriesRepository)
: base(seriesService, seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingService, : base(seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingService,
allowedDownloadSpecification) allowedDownloadSpecification)
{ {
_seriesRepository = seriesRepository;
} }
public DailyEpisodeSearch() public DailyEpisodeSearch()

View File

@ -20,10 +20,10 @@ public class EpisodeSearch : SearchBase
{ {
private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public EpisodeSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService, public EpisodeSearch(IEpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService,
SceneMappingService sceneMappingService, AllowedDownloadSpecification allowedDownloadSpecification, SceneMappingService sceneMappingService, AllowedDownloadSpecification allowedDownloadSpecification,
ISeriesRepository seriesRepository) ISeriesRepository seriesRepository)
: base(seriesService,seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingService, : base(seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingService,
allowedDownloadSpecification) allowedDownloadSpecification)
{ {
} }

View File

@ -20,10 +20,10 @@ public class PartialSeasonSearch : SearchBase
{ {
private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public PartialSeasonSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService, public PartialSeasonSearch(IEpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService,
SceneMappingService sceneMappingService, AllowedDownloadSpecification allowedDownloadSpecification, SceneMappingService sceneMappingService, AllowedDownloadSpecification allowedDownloadSpecification,
ISeriesRepository seriesRepository) ISeriesRepository seriesRepository)
: base(seriesService, seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingService, : base(seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingService,
allowedDownloadSpecification) allowedDownloadSpecification)
{ {
} }

View File

@ -17,7 +17,6 @@ namespace NzbDrone.Core.Providers.Search
{ {
public abstract class SearchBase public abstract class SearchBase
{ {
protected readonly ISeriesService _seriesService;
private readonly ISeriesRepository _seriesRepository; private readonly ISeriesRepository _seriesRepository;
protected readonly IEpisodeService _episodeService; protected readonly IEpisodeService _episodeService;
protected readonly DownloadProvider _downloadProvider; protected readonly DownloadProvider _downloadProvider;
@ -27,11 +26,10 @@ public abstract class SearchBase
private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private static readonly Logger logger = LogManager.GetCurrentClassLogger();
protected SearchBase(ISeriesService seriesService,ISeriesRepository seriesRepository, IEpisodeService episodeService, DownloadProvider downloadProvider, protected SearchBase(ISeriesRepository seriesRepository, IEpisodeService episodeService, DownloadProvider downloadProvider,
IIndexerService indexerService, SceneMappingService sceneMappingService, IIndexerService indexerService, SceneMappingService sceneMappingService,
AllowedDownloadSpecification allowedDownloadSpecification) AllowedDownloadSpecification allowedDownloadSpecification)
{ {
_seriesService = seriesService;
_seriesRepository = seriesRepository; _seriesRepository = seriesRepository;
_episodeService = episodeService; _episodeService = episodeService;
_downloadProvider = downloadProvider; _downloadProvider = downloadProvider;

View File

@ -1,32 +1,22 @@
using System; using System.Collections.Generic;
using System.Collections;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
using NLog; using NLog;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
using NzbDrone.Core.Model;
using NzbDrone.Core.Model.Notification; using NzbDrone.Core.Model.Notification;
using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Providers.Search; using NzbDrone.Core.Providers.Search;
using NzbDrone.Core.Repository;
using NzbDrone.Core.Repository.Search;
namespace NzbDrone.Core.Providers namespace NzbDrone.Core.Providers
{ {
public class SearchProvider public class SearchProvider
{ {
private readonly ISeriesService _seriesService;
private readonly IEpisodeService _episodeService; private readonly IEpisodeService _episodeService;
private readonly PartialSeasonSearch _partialSeasonSearch; private readonly PartialSeasonSearch _partialSeasonSearch;
private readonly ISeriesRepository _seriesRepository; private readonly ISeriesRepository _seriesRepository;
private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public SearchProvider(ISeriesService seriesService, IEpisodeService episodeService, public SearchProvider(IEpisodeService episodeService, PartialSeasonSearch partialSeasonSearch, ISeriesRepository seriesRepository)
PartialSeasonSearch partialSeasonSearch,ISeriesRepository seriesRepository)
{ {
_seriesService = seriesService;
_episodeService = episodeService; _episodeService = episodeService;
_partialSeasonSearch = partialSeasonSearch; _partialSeasonSearch = partialSeasonSearch;
_seriesRepository = seriesRepository; _seriesRepository = seriesRepository;
@ -89,7 +79,7 @@ public virtual List<int> PartialSeasonSearch(ProgressNotification notification,
return new List<int>(); return new List<int>();
} }
return _partialSeasonSearch.Search(series, new {SeasonNumber = seasonNumber, Episodes = episodes}, notification); return _partialSeasonSearch.Search(series, new { SeasonNumber = seasonNumber, Episodes = episodes }, notification);
} }
} }
} }

View File

@ -1,27 +1,21 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using NLog; using NLog;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
using NzbDrone.Core.Repository;
namespace NzbDrone.Core.Providers namespace NzbDrone.Core.Providers
{ {
public class XemProvider public class XemProvider
{ {
private readonly ISeriesService _seriesService;
private readonly IEpisodeService _episodeService; private readonly IEpisodeService _episodeService;
private readonly XemCommunicationProvider _xemCommunicationProvider; private readonly XemCommunicationProvider _xemCommunicationProvider;
private readonly ISeriesRepository _seriesRepository; private readonly ISeriesRepository _seriesRepository;
private static readonly Logger _logger = LogManager.GetCurrentClassLogger(); private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
public XemProvider(ISeriesService seriesService, IEpisodeService episodeService, public XemProvider(IEpisodeService episodeService,XemCommunicationProvider xemCommunicationProvider,ISeriesRepository seriesRepository)
XemCommunicationProvider xemCommunicationProvider,ISeriesRepository seriesRepository)
{ {
_seriesService = seriesService;
_episodeService = episodeService; _episodeService = episodeService;
_xemCommunicationProvider = xemCommunicationProvider; _xemCommunicationProvider = xemCommunicationProvider;
_seriesRepository = seriesRepository; _seriesRepository = seriesRepository;

View File

@ -6,7 +6,6 @@
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Core.Datastore; using NzbDrone.Core.Datastore;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
using NzbDrone.Core.Providers;
namespace NzbDrone.Core.RootFolders namespace NzbDrone.Core.RootFolders
{ {
@ -25,14 +24,12 @@ public class RootFolderService : IRootFolderService
private readonly IBasicRepository<RootFolder> _rootFolderRepository; private readonly IBasicRepository<RootFolder> _rootFolderRepository;
private readonly DiskProvider _diskProvider; private readonly DiskProvider _diskProvider;
private readonly ISeriesRepository _seriesRepository; private readonly ISeriesRepository _seriesRepository;
private readonly ISeriesService _seriesService;
public RootFolderService(IBasicRepository<RootFolder> rootFolderRepository, ISeriesService seriesService, DiskProvider diskProvider,ISeriesRepository seriesRepository) public RootFolderService(IBasicRepository<RootFolder> rootFolderRepository, DiskProvider diskProvider,ISeriesRepository seriesRepository)
{ {
_rootFolderRepository = rootFolderRepository; _rootFolderRepository = rootFolderRepository;
_diskProvider = diskProvider; _diskProvider = diskProvider;
_seriesRepository = seriesRepository; _seriesRepository = seriesRepository;
_seriesService = seriesService;
} }
public virtual List<RootFolder> All() public virtual List<RootFolder> All()