Merge pull request #2943 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2017-10-05 14:12:16 -04:00 committed by GitHub
commit 8eeca98fef
14 changed files with 41 additions and 23 deletions

View File

@ -139,6 +139,10 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
try
{
stream.Seek(offset, SeekOrigin.End);
}
catch (IOException)
{
}
catch (ArgumentException)
{

View File

@ -29,7 +29,7 @@ namespace Emby.Server.Implementations.Networking
public List<IpAddressInfo> GetLocalIpAddresses()
{
const int cacheMinutes = 5;
const int cacheMinutes = 10;
lock (_localIpAddressSyncLock)
{
@ -198,12 +198,6 @@ namespace Emby.Server.Implementations.Networking
return Dns.GetHostAddressesAsync(hostName);
}
private readonly List<NetworkInterfaceType> _validNetworkInterfaceTypes = new List<NetworkInterfaceType>
{
NetworkInterfaceType.Ethernet,
NetworkInterfaceType.Wireless80211
};
private List<IPAddress> GetIPsDefault()
{
NetworkInterface[] interfaces;
@ -227,7 +221,8 @@ namespace Emby.Server.Implementations.Networking
try
{
Logger.Debug("Querying interface: {0}. Type: {1}. Status: {2}", network.Name, network.NetworkInterfaceType, network.OperationalStatus);
// suppress logging because it might be causing nas device wake up
//Logger.Debug("Querying interface: {0}. Type: {1}. Status: {2}", network.Name, network.NetworkInterfaceType, network.OperationalStatus);
var ipProperties = network.GetIPProperties();

View File

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

View File

@ -1960,6 +1960,12 @@ namespace MediaBrowser.Controller.MediaEncoding
return "-c:v h264_mmal";
}
break;
case "mpeg2video":
if (_mediaEncoder.SupportsDecoder("mpeg2_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase))
{
return "-c:v mpeg2_mmal";
}
break;
}
}
}

View File

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

View File

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

View File

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

View File

@ -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;
}

View File

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

View File

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

View File

@ -22,7 +22,7 @@ using System.Threading.Tasks;
namespace MediaBrowser.Providers.Omdb
{
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 IHttpClient _httpClient;
@ -41,6 +41,15 @@ namespace MediaBrowser.Providers.Omdb
_configurationManager = configurationManager;
}
public int Order
{
get
{
// After primary option
return 1;
}
}
public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(SeriesInfo searchInfo, CancellationToken cancellationToken)
{
return GetSearchResults(searchInfo, "series", cancellationToken);

View File

@ -46,7 +46,7 @@ namespace MediaBrowser.Providers.Omdb
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
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase) || _configurationManager.Configuration.EnableNewOmdbSupport)
{
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
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase))
if (string.Equals(language, "en", StringComparison.OrdinalIgnoreCase) || _configurationManager.Configuration.EnableNewOmdbSupport)
{
item.Name = result.Title;
@ -389,7 +389,7 @@ namespace MediaBrowser.Providers.Omdb
{
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
// But only do it if english is the preferred language because this data will not be localized

View File

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

View File

@ -1,3 +1,3 @@
using System.Reflection;
[assembly: AssemblyVersion("3.2.33.2")]
[assembly: AssemblyVersion("3.2.33.3")]