Example #1
0
    public void Init()
    {
      string testDataLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty;
      string cacheLocation = Path.Combine(testDataLocation, "TheMovieDB");
      // Delete cache to force online lookups
      if (Directory.Exists(cacheLocation))
        Directory.Delete(cacheLocation, true);

      PathManager pathManager = new PathManager();
      pathManager.SetPath("DATA", testDataLocation);

      ServiceRegistration.Set<IPathManager>(pathManager);
      ServiceRegistration.Set<ILocalization>(new NoLocalization());
      ServiceRegistration.Set<ILogger>(new NoLogger());

      _matcher = new MovieTheMovieDbMatcher { DownloadFanart = false };
      _matcher.Init();
    }
Example #2
0
        public void Init()
        {
            string testDataLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty;
            string cacheLocation    = Path.Combine(testDataLocation, "TheMovieDB");

            // Delete cache to force online lookups
            if (Directory.Exists(cacheLocation))
            {
                Directory.Delete(cacheLocation, true);
            }

            PathManager pathManager = new PathManager();

            pathManager.SetPath("DATA", testDataLocation);

            ServiceRegistration.Set <IPathManager>(pathManager);
            ServiceRegistration.Set <ILocalization>(new NoLocalization());
            ServiceRegistration.Set <ILogger>(new NoLogger());

            _matcher = new MovieTheMovieDbMatcher {
                DownloadFanart = false
            };
            _matcher.Init();
        }