adjust default provider order

pull/1154/head
Luke Pulverenti 7 years ago
parent fd621bbc52
commit 51ca72ab5d

@ -95,6 +95,7 @@ namespace MediaBrowser.Api
config.EnableSimpleArtistDetection = true; config.EnableSimpleArtistDetection = true;
config.EnableNormalizedItemByNameIds = true; config.EnableNormalizedItemByNameIds = true;
config.DisableLiveTvChannelUserDataName = true; config.DisableLiveTvChannelUserDataName = true;
config.EnableNewOmdbSupport = true;
} }
public void Post(UpdateStartupConfiguration request) public void Post(UpdateStartupConfiguration request)

@ -20,6 +20,7 @@ namespace MediaBrowser.Controller.Providers
public bool HasMetadata { get; set; } public bool HasMetadata { get; set; }
public T Item { get; set; } public T Item { get; set; }
public string ResultLanguage { get; set; } public string ResultLanguage { get; set; }
public string Provider { get; set; }
public bool QueriedById { get; set; } public bool QueriedById { get; set; }
public void AddPerson(PersonInfo p) public void AddPerson(PersonInfo p)
{ {

@ -183,6 +183,7 @@ namespace MediaBrowser.Model.Configuration
public bool EnableExternalContentInSuggestions { get; set; } public bool EnableExternalContentInSuggestions { get; set; }
public bool RequireHttps { get; set; } public bool RequireHttps { get; set; }
public bool IsBehindProxy { get; set; } public bool IsBehindProxy { get; set; }
public bool EnableNewOmdbSupport { get; set; }
public int ImageExtractionTimeoutMs { get; set; } public int ImageExtractionTimeoutMs { get; set; }
@ -343,8 +344,8 @@ namespace MediaBrowser.Model.Configuration
Type = ImageType.Logo Type = ImageType.Logo
} }
}, },
DisabledMetadataFetchers = new []{ "The Open Movie Database" },
DisabledImageFetchers = new [] {"FanArt"} DisabledImageFetchers = new []{ "The Open Movie Database", "FanArt" }
}, },
new MetadataOptions(1, 1280) new MetadataOptions(1, 1280)
@ -389,7 +390,9 @@ namespace MediaBrowser.Model.Configuration
Limit = 1, Limit = 1,
Type = ImageType.Logo Type = ImageType.Logo
} }
} },
DisabledMetadataFetchers = new []{ "TheMovieDb" },
DisabledImageFetchers = new []{ "TheMovieDb" }
}, },
new MetadataOptions(1, 1280) new MetadataOptions(1, 1280)

@ -655,6 +655,8 @@ namespace MediaBrowser.Providers.Manager
if (result.HasMetadata) if (result.HasMetadata)
{ {
result.Provider = provider.Name;
results.Add(result); results.Add(result);
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataDownload; refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataDownload;

@ -51,7 +51,7 @@ namespace MediaBrowser.Providers.Manager
} }
} }
if (replaceData || !target.CommunityRating.HasValue) if (replaceData || !target.CommunityRating.HasValue || (source.CommunityRating.HasValue && string.Equals(sourceResult.Provider, "The Open Movie Database", StringComparison.OrdinalIgnoreCase)))
{ {
target.CommunityRating = source.CommunityRating; target.CommunityRating = source.CommunityRating;
} }

@ -629,8 +629,7 @@ namespace MediaBrowser.Providers.Movies
{ {
get get
{ {
// After Omdb return 0;
return 1;
} }
} }

@ -36,8 +36,7 @@ namespace MediaBrowser.Providers.Movies
{ {
get get
{ {
// After Omdb return 0;
return 1;
} }
} }

@ -22,7 +22,7 @@ using System.Threading.Tasks;
namespace MediaBrowser.Providers.Omdb namespace MediaBrowser.Providers.Omdb
{ {
public class OmdbItemProvider : IRemoteMetadataProvider<Series, SeriesInfo>, public class OmdbItemProvider : IRemoteMetadataProvider<Series, SeriesInfo>,
IRemoteMetadataProvider<Movie, MovieInfo>, IRemoteMetadataProvider<Trailer, TrailerInfo> IRemoteMetadataProvider<Movie, MovieInfo>, IRemoteMetadataProvider<Trailer, TrailerInfo>, IHasOrder
{ {
private readonly IJsonSerializer _jsonSerializer; private readonly IJsonSerializer _jsonSerializer;
private readonly IHttpClient _httpClient; private readonly IHttpClient _httpClient;
@ -41,6 +41,15 @@ namespace MediaBrowser.Providers.Omdb
_configurationManager = configurationManager; _configurationManager = configurationManager;
} }
public int Order
{
get
{
// After primary option
return 1;
}
}
public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(SeriesInfo searchInfo, CancellationToken cancellationToken) public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(SeriesInfo searchInfo, CancellationToken cancellationToken)
{ {
return GetSearchResults(searchInfo, "series", cancellationToken); return GetSearchResults(searchInfo, "series", cancellationToken);

@ -46,7 +46,7 @@ namespace MediaBrowser.Providers.Omdb
var result = await GetRootObject(imdbId, cancellationToken).ConfigureAwait(false); var result = await GetRootObject(imdbId, cancellationToken).ConfigureAwait(false);
// Only take the name and rating if the user's language is set to english, since Omdb has no localization // Only take the name and rating if the user's language is set to english, since Omdb has no localization
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase)) if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase) || _configurationManager.Configuration.EnableNewOmdbSupport)
{ {
item.Name = result.Title; item.Name = result.Title;
@ -153,7 +153,7 @@ namespace MediaBrowser.Providers.Omdb
} }
// Only take the name and rating if the user's language is set to english, since Omdb has no localization // Only take the name and rating if the user's language is set to english, since Omdb has no localization
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase)) if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase) || _configurationManager.Configuration.EnableNewOmdbSupport)
{ {
item.Name = result.Title; item.Name = result.Title;
@ -389,7 +389,7 @@ namespace MediaBrowser.Providers.Omdb
{ {
T item = itemResult.Item; T item = itemResult.Item;
var isConfiguredForEnglish = IsConfiguredForEnglish(item); var isConfiguredForEnglish = IsConfiguredForEnglish(item) || _configurationManager.Configuration.EnableNewOmdbSupport;
// Grab series genres because imdb data is better than tvdb. Leave movies alone // Grab series genres because imdb data is better than tvdb. Leave movies alone
// But only do it if english is the preferred language because this data will not be localized // But only do it if english is the preferred language because this data will not be localized

@ -1631,8 +1631,7 @@ namespace MediaBrowser.Providers.TV
{ {
get get
{ {
// After Omdb return 0;
return 1;
} }
} }

Loading…
Cancel
Save