diff --git a/MediaBrowser.Providers/Movies/MovieDbPersonImageProvider.cs b/MediaBrowser.Providers/Movies/MovieDbPersonImageProvider.cs
index 9074663f0..43550c358 100644
--- a/MediaBrowser.Providers/Movies/MovieDbPersonImageProvider.cs
+++ b/MediaBrowser.Providers/Movies/MovieDbPersonImageProvider.cs
@@ -2,7 +2,6 @@
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
diff --git a/MediaBrowser.Providers/Movies/MovieDbPersonProvider.cs b/MediaBrowser.Providers/Movies/MovieDbPersonProvider.cs
index fe2b301d1..773f9bd25 100644
--- a/MediaBrowser.Providers/Movies/MovieDbPersonProvider.cs
+++ b/MediaBrowser.Providers/Movies/MovieDbPersonProvider.cs
@@ -13,7 +13,6 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
-using System.Linq;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
@@ -173,10 +172,6 @@ namespace MediaBrowser.Providers.Movies
{
await FetchInfo(person, id, force, cancellationToken).ConfigureAwait(false);
}
- else
- {
- Logger.Debug("TmdbPersonProvider Unable to obtain id for " + item.Name);
- }
SetLastRefreshed(item, DateTime.UtcNow);
return true;
@@ -256,10 +251,6 @@ namespace MediaBrowser.Providers.Movies
cancellationToken.ThrowIfCancellationRequested();
ProcessInfo(person, info);
-
- Logger.Debug("TmdbPersonProvider downloaded and saved information for {0}", person.Name);
-
- await FetchImages(person, info.images, cancellationToken).ConfigureAwait(false);
}
}
@@ -326,81 +317,6 @@ namespace MediaBrowser.Providers.Movies
person.SetProviderId(MetadataProviders.Tmdb, searchResult.id.ToString(_usCulture));
}
- ///
- /// Fetches the images.
- ///
- /// The person.
- /// The search result.
- /// The cancellation token.
- /// Task.
- private async Task FetchImages(Person person, Images searchResult, CancellationToken cancellationToken)
- {
- if (searchResult != null && searchResult.profiles.Count > 0)
- {
- //get our language
- var profile =
- searchResult.profiles.FirstOrDefault(
- p =>
- !string.IsNullOrEmpty(GetIso639(p)) &&
- GetIso639(p).Equals(ConfigurationManager.Configuration.PreferredMetadataLanguage,
- StringComparison.OrdinalIgnoreCase));
- if (profile == null)
- {
- //didn't find our language - try first null one
- profile =
- searchResult.profiles.FirstOrDefault(
- p =>
- !string.IsNullOrEmpty(GetIso639(p)) &&
- GetIso639(p).Equals(ConfigurationManager.Configuration.PreferredMetadataLanguage,
- StringComparison.OrdinalIgnoreCase));
-
- }
- if (profile == null)
- {
- //still nothing - just get first one
- profile = searchResult.profiles[0];
- }
- if (profile != null && !person.HasImage(ImageType.Primary))
- {
- var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
-
- await DownloadAndSaveImage(person, tmdbSettings.images.base_url + "original" + profile.file_path,
- MimeTypes.GetMimeType(profile.file_path), cancellationToken).ConfigureAwait(false);
- }
- }
- }
-
- private string GetIso639(Profile p)
- {
- return p.iso_639_1 == null ? string.Empty : p.iso_639_1.ToString();
- }
-
- ///
- /// Downloads the and save image.
- ///
- /// The item.
- /// The source.
- /// Type of the MIME.
- /// The cancellation token.
- /// Task{System.String}.
- private async Task DownloadAndSaveImage(BaseItem item, string source, string mimeType, CancellationToken cancellationToken)
- {
- if (source == null) return;
-
- using (var sourceStream = await MovieDbProvider.Current.GetMovieDbResponse(new HttpRequestOptions
- {
- Url = source,
- CancellationToken = cancellationToken
-
- }).ConfigureAwait(false))
- {
- await ProviderManager.SaveImage(item, sourceStream, mimeType, ImageType.Primary, null, source, cancellationToken)
- .ConfigureAwait(false);
-
- Logger.Debug("TmdbPersonProvider downloaded and saved image for {0}", item.Name);
- }
- }
-
#region Result Objects
///
/// Class PersonSearchResult